/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { $googleId = Google::latest()->first(); return view('admin.google.analytics', compact('googleId')); }
/** * Bootstrap any application services. * * @return void */ public function boot() { view()->composer('admin.google.partials.id', function ($view) { $view->with('googleId', Google::latest()->first()); }); }