style not loading via route controller

I have setup blog and its' database with form submitting.It works all fine.The blog grid view also works fine with query.When accessing a specific ad individually it partially loads the page, yet the values are loaded.


//store function
return redirect()->route('', $post->id);

//show function
 public function show($id)
        $post = Post::find($id);
        return view('user.productpage')->withPost($post);


Route::get('create-ad', '[email protected]');
Route::post('create-ad', '[email protected]')->name('store'); 
Route::get('ads/{id}', '[email protected]')->name('');

Route::get('ads','[email protected]')->name('show_ads');



<h1>{{ $post->year}}</h1>



What causes this. the css is working properly though. have run dump auto-load and artisan cache:clear .

Cameron replied 2 months ago

is that bladefile code above the user.productpage blade code?

can you try

return view('user.productpage', 
compact( 'post')
Cameron replied 2 months ago

also, if you are using webpack, it uses scss and compiles to public / css /app.css if that is the case in your app make sure your blade file is loading the css <link href="{{ asset('css/app.css') }}" rel="stylesheet"> or better <link rel="stylesheet" href="{{ mix('/css/app.css') }}">

alicetaylor replied 1 month ago

Thanks for sharing the information. It is very useful for my future. keep sharing

run 3

Sign in to participate in this thread!

We'd like to thank these amazing companies for supporting us