Support the ongoing development of Laravel.io →
Installation Blade
Last updated 1 year ago.
0

Oh nice this forum supports some tags

0

Not quite sure how to use them though...

0

This is how it's supposed to work in the documentation:

<?php namespace App\Http\Controllers; use App\Http\Controllers\Controller; class UserController extends Controller { /** * Show the profile for the given user. * * @param int $id * @return Response */ public function showProfile($id) { return view('user.profile', ['user' => User::findOrFail($id)]); } } similar to mine, but mine does'nt work, why?
0

Oh now I get it why nobody's answering. All you nerds live on the other side of the earth. It's night for you right now

0

I've yet to finish my morning caffeine recharge, but I think the period in the template name makes the path conversion a directory.

'post.new'

would try to load - views\post\new.blade.php
0

Thanks, that actually helped me a little bit. There can't be dots in filenames in the view-folder

0

Dots are actually slashes, but a bit more OOP:) - So each dot is a slah with the exception of *.blade.php in the recources/views/ directory.

Switching to swedish, guessing muppbarn is swede:P Det betyder att

return view('user.profile.partials.nav');

laddar in 'recources/views/user/profile/partials/nav.blade.php'

Det är superbra när man ska inkludera och "extenda" i designen blir superlätt att läsa..

Last updated 8 years ago.
0

ironyh said:

Dots are actually slashes, but a bit more OOP:) - So each dot is a slah with the exception of *.blade.php in the recources/views/ directory.

Switching to swedish, guessing muppbarn is swede:P Det betyder att

return view('user.profile.partials.nav');

laddar in 'recources/views/user/profile/partials/nav.blade.php'

Det är superbra när man ska inkludera och "extenda" i designen blir superlätt att läsa..

Ok, the main question of the thread: The views is supposed to be "returned" from the routes.php and not the controller?

0

Ok thanks guys, I think I got it now. Anyway it works

Views are called from the controller with return view(file');

return view('forms.register'); means for example folder: forms and file: register.blade.php

0

Sign in to participate in this thread!

Eventy

Your banner here too?

muppbarn muppbarn Joined 29 Mar 2016

Moderators

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

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.