app/Http/Controllers/Admin/front/MissionController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        $missions = $missions->paginate(10);
        return view('dashboard.indexbig', compact('missions'));
        fatma
        $missions = Mission::orderBy('id');
        $this->search = [
            'name' =>\request()->get('name') ,
        ];
        if ($this->search['name']){
            $missions->where('name' , 'like' , "%{$this->search['name']}%");
        }
        $missions=$missions->paginate(10)->appends($this->search);
        return view('frontend.mission.index')->with('missions',$missions);
    }
public function index ( ) { $ missions = Mission :: orderBy ( 'id' ) ; $ this -> search = [ 'name' => \ request ( ) -> get ( 'name' ) , ] ; if ( $ this -> search [ 'name' ] ) { $ missions -> where ( 'name' , 'like' , " % { $ this -> search [ 'name' ] } % " ) ; } $ missions = $ missions -> paginate ( 10 ) -> appends ( $ this -> search ) ; return view ( 'frontend.mission.index' ) -> with ( 'missions' , $ missions ) ; }
Display a listing of the resource.
Display a listing of the resource .
//rana //        $missions = Mission::whereRaw('true')->orderBy('id','desc'); // //        $missions = $missions->paginate(10); //        return view('dashboard.indexbig', compact('missions')); //fatma