app/Http/Controllers/Dashboard/AddstoreController.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()
    {
        $stores = DB::table('add_stores')
        ->join('categories', 'categories.id', '=','add_stores.tsnef')
        ->join('countries as city','city.id', '=','add_stores.city')
        ->join('countries as govern','govern.id', '=','add_stores.Governorate')
        ->select('add_stores.*','categories.name as cat_name','city.title as city_title','govern.title as govern_title')
       ->get();
        return view('dashboard.addstore.index', compact('stores'));
    }
public function index ( ) { $ stores = DB :: table ( 'add_stores' ) -> join ( 'categories' , 'categories.id' , '=' , 'add_stores.tsnef' ) -> join ( 'countries as city' , 'city.id' , '=' , 'add_stores.city' ) -> join ( 'countries as govern' , 'govern.id' , '=' , 'add_stores.Governorate' ) -> select ( 'add_stores.*' , 'categories.name as cat_name' , 'city.title as city_title' , 'govern.title as govern_title' ) -> get ( ) ; return view ( 'dashboard.addstore.index' , compact ( 'stores' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .
//dd($stores);