public function editMyProfile() { $profile = Auth::user()->profile; $contacts = json_decode($profile->phone); $section = Section::orderBy('sort_id')->where('status', 1)->get(); return view('profile.my_profile_edit', compact('profile', 'contacts', 'section')); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id, Request $req) { if ($req->ajax()) { return $this->getTags($req->input('cat_id')); } $post = Auth::user()->posts()->find($id); $contacts = json_decode($post->phone); $section = Section::orderBy('sort_id')->where('service_id', 1)->where('status', 1)->get(); $all_tags = $this->getTags($post->category_id); return view('board.edit_post', compact('post', 'section', 'contacts', 'all_tags')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $section = Section::orderBy('service_id')->get(); return view('admin.section.index', compact('section')); }
public function add($id) { $sections = Section::orderBy('name')->get(); return view('admin.user.section.add', compact('id', 'sections')); }
public function sections(Request $request) { if ($request->sort && $request->orderby) { $sections = Section::orderBy($request->sort, $request->orderby)->paginate(15); } else { $sections = Section::orderBy('created_at', 'desc')->paginate(15); } return view('admin.sections', compact('sections')); }
public function editMyProfile() { $profile = Auth::user()->profile; $section = Section::orderBy('sort_id')->get(); return view('profile.my_profile_edit', compact('profile', 'section')); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { $post = Auth::user()->posts()->find($id); $contacts = json_decode($post->phone); $section = Section::orderBy('sort_id')->where('service_id', 2)->where('status', 1)->get(); return view('tender.edit_post', compact('post', 'section', 'contacts')); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { $post = Auth::user()->posts()->find($id); $section = Section::orderBy('sort_id')->get(); return view('board.edit_post', compact('post', 'section')); }