app/Http/Controllers/AdminHomepageController.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()
    {
        $homepages = Homepage::all();
        if($homepages->count() === 0){
            $homepages = Homepage::create();
        }
        return view('admin.homepages.index', compact('homepages'));
    }
public function index ( ) { $ homepages = Homepage :: all ( ) ; if ( $ homepages -> count ( ) === 0 ) { $ homepages = Homepage :: create ( ) ; } return view ( 'admin.homepages.index' , compact ( 'homepages' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .
//