Thanks to your video, I was able to get some answers while I was shaving )
@DanielJimenez-ig8mv8 ай бұрын
Hi sr Laravel Daily, I want to tahnks you for videos. I learned too much , greetings from Chile
@AAlani-uz4gm3 жыл бұрын
Thanks Povilas, this helped me solve a problem i had with namespaces
@leslysuarez96863 жыл бұрын
I just finished the activity you have in your repository about the routes and I realized that I was half lost, but thanks to that now I know a little more. Thank you very much for your time. I saw this video several times that I did not understand well about the route group 🤯
@belce19823 жыл бұрын
Thanks as always, learning day by day thanks to you Povilas!
@LeigerGaming4 жыл бұрын
I did not know about apiResource! Legend.
@Mariia-lr4vx Жыл бұрын
Excellent explanations! Thank you a lot!
@nikkolumahang4 жыл бұрын
Really nice. I love your practical examples. Keep it up!
@lloydguia31183 жыл бұрын
huli ka hahahah
@nikkolumahang3 жыл бұрын
@@lloydguia3118 follower diay pud ka ani nga channel? hahaha
@lloydguia31183 жыл бұрын
@@nikkolumahang Oh hahaha dali ra kaayu ma sabtang iyang tuto
@nikkolumahang3 жыл бұрын
@@lloydguia3118 ayos kaayo iyang mga tips sa laravel
@amrullahdev88954 жыл бұрын
Such a awesome explanation and tutorial from the simple to advance . Thanks
@judenoel7286 Жыл бұрын
This was great very very useful 👌
@HenryDavidLie4 жыл бұрын
Your explanation is so on point, i really like that, thankyou!
@Oda39083 жыл бұрын
Great tutorial! Will be even better if mentioned on some option methods such as overwrite the default parameter name.
@AsankaRubasinghe3 жыл бұрын
Thank you very much for the great explanation sir..
3 жыл бұрын
Awesome, awesome, awesome. Thank you Korop!
@ChangeYourLifeForever Жыл бұрын
really thank you great explanation
@upliftingspirit68733 жыл бұрын
I have watched more than 20 videos in just 2 days. This channel is all I was looking for, thank you very much for the effort you put for these videos! I want to ask something. How would you format your resource routes if some actions have different middlewares than the rest? For example, create is allowed for authenticated users, but edit is allowed for authenticated AND the user must own the resource
@LaravelDaily3 жыл бұрын
I would use Policies for this.
@upliftingspirit68733 жыл бұрын
@@LaravelDaily Yeah but still the policies have to be assigned (?) (or in the resource controller) Can this be achieved entirely in the routes file ? Namely, assign separate middleware, ie ['middleware' => ['create'=>'create-resource', 'edit' => 'edit-resource']]
@LaravelDaily3 жыл бұрын
I don't think I've seen that defined in the routes. You activate the middleware for specific controller method directly in that method of that controller. Or, in the constructor: public function __construct() { $this->middleware('auth'); $this->middleware('log')->only('index');
@upliftingspirit68733 жыл бұрын
@@LaravelDaily Yeah that's the alternative way I saw as well; i guess having them all in the constructor sounds better. Thanks:)
@chlouis-girardot4 жыл бұрын
Just awesome ! Thank you so much 👍🏼
@nurudeenqoyyumtimilehin54754 жыл бұрын
If you rewind this video to get one or two concept, thumbs up.
@VijayKumar-rv2mw4 жыл бұрын
So helpful. Thank you.
@azhanhannan12272 жыл бұрын
great sharing, i've learn a l
@issaissifou49593 жыл бұрын
Thank you!
@redayoub4 жыл бұрын
thanks for this informative video
@neelnitin28504 жыл бұрын
You are osm man...👍👍
@valcmeza4 жыл бұрын
Great video!
@REDIDSoft4 жыл бұрын
Amazing videos!!!
@R0b3 Жыл бұрын
Hi there. How can I divide my routes that share the same method?I have different roles in my application, admis, doctor, management and so on. I've made a CRUD controller and some methods are allowed and other no by check different roles. How can I reach my scope? I used a Resource controller but I don't know how can I split them. Thanks.
@iHariPatel4 жыл бұрын
Thank you
@RANJEETKUMAR-wz4dg3 жыл бұрын
thanks
@relliv20194 жыл бұрын
i am using laravel 6, jwt and custom role-permission system, now i am working this method. is it best practise? or any suggestion? /** * Plane */ Route::namespace('Plane')->prefix('plane')->group(function () { /** * Airports */ Route::namespace('Airport')->prefix('airport')->group(function () { $ct = 'AirportController'; Route::get('list', "{$ct}@index")->middleware('role:show_airport'); Route::post('', "{$ct}@store")->middleware('role:add_airport'); Route::get('cities', "{$ct}@cities")->middleware('role:show_airport'); Route::group([ 'prefix' => '{id}', 'where' => [ 'id' => '[0-9]+' ]], function () use ($ct) { Route::get('', "{$ct}@show")->middleware('role:show_airport'); Route::put('', "{$ct}@update")->middleware('role:edit_airport'); Route::delete('', "{$ct}@destroy")->middleware('role:delete_airport'); }); }); });
@waelmoh3 жыл бұрын
Big like
@yuliarahma13003 жыл бұрын
if i put controller in sub folder like App\Http\Controllers\Sub1\Sub2\HomeController , how i call it on the route? thanks.
@LaravelDaily3 жыл бұрын
You call it with full namespace, App\Http...
@yuliarahma13003 жыл бұрын
@@LaravelDaily got it, can it combine with route prefix ?
@LaravelDaily3 жыл бұрын
Yes. Read the Laravel docs for that.
@samiullah00113 жыл бұрын
Hey Daily What should syntax be the name of folder in Controller. Mean folder name is singular or plural. Like you created folder called Admin. For example I want to create Category or Categories?
@LaravelDaily3 жыл бұрын
It's your personal choice
@thesemicolon19714 жыл бұрын
Can you please give some resources related to subdomain routing, generating subdomain for every user like you do in quick admin panel when a bee panel is generated
@PovilasKorop4 жыл бұрын
This video may help kzbin.info/www/bejne/emOYdKupj7SBrMU But, of course, configuring wildcard subdomain routing requires the web-server and DNS configuration, not only code. So this topic is outside Laravel.
@overLordOrigin3 жыл бұрын
hi. how can send parameters inside group of middleware?
@LaravelDaily3 жыл бұрын
You can't send parameters to a group, only to a route
@overLordOrigin3 жыл бұрын
@@LaravelDaily have not any solutions?i am forcing to use groups
@LaravelDaily3 жыл бұрын
I don't even imagine how parameters would be used in groups, if each route may have individual parameters. To me, it's not logical.
@ClickShot18mm4 жыл бұрын
Which IDE you use?
@PovilasKorop4 жыл бұрын
Phpstorm
@NebsterSK4 жыл бұрын
It took me a long time to realise that you can have route group WITHOUT prefix & name. I thought it is mandatory.
@SpuxyYEZ4 жыл бұрын
but its actually purpose of group to use name/prefix because middleware and l8 doc advices to use middlewares in controllers + namespacing in laravel8 is not usable anymore because of "Class name resolution"
@ForzaPilot4 жыл бұрын
Good morning! I'm new to Laravel, and I'm having an issue with eloquent relationships. I have a table for cars and I want to create a relationship with a table for builds. My issue is I haven't been able to figure out how to create the relationship of the build to the car when I enter the build. I have the car_id field working in the build table, but I've only been able to make it work manually. How do I make the relationship of the build to the car work from the build.create.php file?
@ExpDev694 жыл бұрын
In your Car model, have a relationship build() which "$this->hasOne(Build::class)". In your Build model, have a relationship car() which "$this->belongsTo(Car::class)". You should now be able to use $car->build or $build->car respectively. This assumes that your builds table have a car_id column that points to the car that specific build belongs to.
@ForzaPilot4 жыл бұрын
Exp Dev The real world examples you’ve done have been very helpful. Could you use my example to show how this is done, or have you already done an example like this? If you’ve already done one please share the link. Thank you for your help!
@ForzaPilot4 жыл бұрын
Exp Dev It feels like learning how to do this will open up so many possibilities for using Laravel for my projects.
@ExpDev694 жыл бұрын
@@ForzaPilot You should read the documentation for real world examples and explanations: laravel.com/docs/7.x/eloquent
@ForzaPilot4 жыл бұрын
Exp Dev Considering how this seems to be one of the core strengths of Laravel I’m surprised I haven’t found a video that shows how to achieve this functionality.
@madaminmj8462 Жыл бұрын
which one is right approach 1. writing auth middleware in route.php 2. writing middleware in controller with construct like this public function __construct() { $this->middleware('auth')->except(['index', 'show']); }
@ifeanyinnaemego8 ай бұрын
The first option is the preferred option
@UIRETU4 жыл бұрын
In laravel 8 this code is completly different
@KoganeNoYubi4 жыл бұрын
in laravel 8 u cant use strings anymore in route definitions , would have to be: Route::resource('/tasks',TaskController::class);
@PovilasKorop4 жыл бұрын
What? I haven't heard of such a change, can you give any link to the documentation or Github change?