app/Http/Controllers/HomeController.php
/**
     * Show the application dashboard.
     *
     * @return \Illuminate\Contracts\Support\Renderable
     */
Show the application dashboard.
@return \Illuminate\Contracts\Support\Renderable
Show the application dashboard . @return \ Illuminate \ Contracts \ Support \ Renderable
public function homepage()
    {
      $data['title']='A Classic Business Directory Service';
      $data['businesses']=Business::where('status',1)->paginate(4);
      $data['categories']=Category::all();
         return view('public.home')->with($data);
    }
public function homepage ( ) { $ data [ 'title' ] = 'A Classic Business Directory Service' ; $ data [ 'businesses' ] = Business :: where ( 'status' , 1 ) -> paginate ( 4 ) ; $ data [ 'categories' ] = Category :: all ( ) ; return view ( 'public.home' ) -> with ( $ data ) ; }
Show the application dashboard.
Show the application dashboard .
//dd($data['businesses']);