Тёмный

Laravel Jetstream: How it Works and Example How to Customize 

Laravel Daily
Подписаться 145 тыс.
Просмотров 81 тыс.
50% 1

Laravel Jetstream came as a new Auth solution with Laravel 8, with a lot of tech-stack that may be new to many Laravel users. Let's unpack how Jetstream works (in its Livewire version) and perform one simple customization - adding a username field to profile.
- - - - -
Try our Laravel QuickAdminPanel: bit.ly/quickad...
Enroll in my Laravel courses: laraveldaily.t...

Опубликовано:

 

2 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 106   
@technery
@technery 3 года назад
My favorite channel for Laravel
@kingbeencent
@kingbeencent 3 года назад
I love your channel! Continue with this nice Content!!
@ricko13
@ricko13 3 года назад
Well said my friend, this Jetstream thing got me OVERWHELMED!
@femiolayemi5902
@femiolayemi5902 2 года назад
thank you, I needed this for understanding why I have to move on to jetstream (complicated).
@targetx1733
@targetx1733 3 года назад
You are so correct, so many new things at once. That's why people are complaining because of the new learning curve.
@xeisu_com
@xeisu_com 3 года назад
For anyone having trouble with the CSS stuff when clicking on "Register" or "Login": It's an issue with the default "app.blade.php" file. You should change "mix('css/app.css')" to "asset('css/app.css')". I think this should also be mentioned in the video since this is the first video that shows up about Laravel Jetstream.
@jgonsuron
@jgonsuron 3 года назад
I like this scaffold, but it is overly complicated to modify. I am trying to build onto the scaffold and add options to the drop down menus in the "profile section" but the routing is totally confusing. I keep getting errors.
@AchrafBardan
@AchrafBardan 3 года назад
I would say try livewire by its own it is the best thing for laravel. Writing php for Ajax requests WOW.
@hernanmartinezreumann3279
@hernanmartinezreumann3279 3 года назад
Caleb Porzio added Alpine too, and is alive for example with the "Saved" flag with time duration, or the modals. In my exerience it is the most difficult to understand. And is essential to get most of jetstream.
@Pav298
@Pav298 3 года назад
Thanks for the video. Really helped me figure out the routing. One question: At 5:36, you show where the method for updateProfileInformation exists. Where does the variable $updater get passed? Thanks!
@edubasecloud8882
@edubasecloud8882 2 года назад
i was confused about x-jet . this video help me to understand the concept. Great effort. Bundle of thanks.
@sabitarturk8720
@sabitarturk8720 10 месяцев назад
I would be very happy if you answer. I want to use Jetstream in the CRM software I developed with Laravel, but it gives errors with the npm install, npm run dev commands. How can I solve this?
@MePeterNicholls
@MePeterNicholls 2 года назад
I dislike the lock in to its way of working (without a lot of effort).
@senthilkannappan9801
@senthilkannappan9801 3 года назад
can you please give us a complete example of how to create a new form with label, input, submit, how it goes to controller and returns output using livewire and jetstream...
@kamilkrzyzanski1270
@kamilkrzyzanski1270 2 года назад
It is wrong to all time complicate code. Why learn a lot of new things all time, it is bed for new programers and generally coding future.
@muhammadsabiil3482
@muhammadsabiil3482 3 года назад
so helpfull, thanks
@novocanal7153
@novocanal7153 3 года назад
Thanks
@gurbeigekolekter8831
@gurbeigekolekter8831 3 года назад
Thank you. Do you have an equivalent video for Jetstream INERTIA staock?
@LaravelDaily
@LaravelDaily 3 года назад
No I don't actively work with Inertia.
@hugoscenes7449
@hugoscenes7449 3 года назад
How can I use Jetstream with docker?
@alexszilagyi
@alexszilagyi Год назад
Thanks @LaravelDaily for the great videos! One question. I have added multiple profile fields and I would like to update them based upon a http response that I get, something like pre-fill. I have manage to do that but I am unable to display the updated profile fields value without refreshing the page manually. Do you have an idea how to solve that use case?
@LaravelDaily
@LaravelDaily Год назад
Sorry this is not something I can answer in a comment, without debugging the actual code.
@alexszilagyi
@alexszilagyi Год назад
@@LaravelDaily I will prepare a repository and share with you. On which email address would you like to share?
@danielhidalgo5425
@danielhidalgo5425 7 месяцев назад
Hello, I have the same issue, have you found out a way to solve it?
@rosu2048
@rosu2048 Год назад
so this is actually a laravel livewire application?
@LaravelDaily
@LaravelDaily Год назад
No
@Kira-gc2jg
@Kira-gc2jg 3 года назад
9:12 What if I want to add a select tag to the form?
@AlfredoElizondoLife
@AlfredoElizondoLife 3 года назад
Also it comes with alpine js.
@sathishk233
@sathishk233 3 года назад
Somebody help me,Myself sathish I am a fullstack developer trainee in angularjs and laravel at indian small IT company,If I will have completed 2 to 3 years experience means,can I go other foreign countries by using this experience And also,is laravel is more familiar other countries?,please guide me
@Poegim
@Poegim 2 года назад
Thanks :)
@RizwanPatel
@RizwanPatel 3 года назад
The mix manifest doesn't exist..... We didn't run npm command?
@FullMe7alJacke7
@FullMe7alJacke7 3 года назад
Did exactly as you did here........... Open up page, "Class Inertia Not Found".... Why am I missing this when I said to use livewire anyway? Okay, whatever, *adds inertia to fix the issue* Refresh landing page, goes to register and BAM. Giant logo and no CSS..... Wtf is going on? There's no reason I should follow you, who is following the DOCS.... Just to have entirely different results on a fresh project... Y'all should've left the old auth system easily useable in laravel 8....
@xeisu_com
@xeisu_com 3 года назад
It's an issue with the default "app.blade.php" file. You should change "mix('css/app.css')" to "asset('css/app.css')".
@Morch1
@Morch1 2 года назад
Maybe I'm doing something wrong but my folder esources\views has onlу one file "app.blade". Why do you have so many?
@itsmejyv
@itsmejyv Месяц назад
Just a question, can we use this in filament?
@LaravelDaily
@LaravelDaily Месяц назад
There's a plugin Filament Jetstream or something like that.
@bosphoramus
@bosphoramus 3 года назад
Also, you can use laravel/ui, its still suported and updated
@QuentinWatt
@QuentinWatt 3 года назад
But conveniently removed from the documentation in version 8
@FullMe7alJacke7
@FullMe7alJacke7 3 года назад
@@QuentinWatt Which leads people like me to think it's entirely not usable in L8
@mohamedel-damarawy6595
@mohamedel-damarawy6595 3 года назад
So it seems that you're preferring livewire over inertia why is that?
@PovilasKorop
@PovilasKorop 3 года назад
It's a personal preference for everyone. I'm a back-end developer at the core, so I love the idea of not writing JavaScript at all, Livewire helps with that.
@mohamedel-damarawy6595
@mohamedel-damarawy6595 3 года назад
@@PovilasKorop Well I do have another comment, the idea of JetStream is to make use of Laravel routing instead of an SPA JS framework routing but I was kinda confused when I opened web.php when I didn't find the routes for profile, teams...etc where did they define them?
@PovilasKorop
@PovilasKorop 3 года назад
@@mohamedel-damarawy6595 They are not public in routes/web.php. They are inside vendor: Here github.com/laravel/jetstream/blob/1.x/routes/livewire.php And here github.com/laravel/jetstream/blob/1.x/src/JetstreamServiceProvider.php#L168
@lserranoit
@lserranoit 3 года назад
One of the best Laravel channels!
@skavihekkora5039
@skavihekkora5039 3 года назад
Still no heidiSql for mac
@blokkaliwon7794
@blokkaliwon7794 3 года назад
How to costumize upload photo profile form to bootstrap template in laravel jetstream, When i copy the coding from file profile-information-form to bootstarap template I get some code at the top page. Thanks sir.
@LaravelDaily
@LaravelDaily 3 года назад
Jetstream is powered by Tailwind, and also a lot of Blade/Alpine/Livewire/Inertia components under the hood, so I guess you can't copy something from one file, it's much more complicated.
@aadrshsharma3636
@aadrshsharma3636 2 года назад
Wah
@marraygaming2466
@marraygaming2466 3 года назад
👉👉👉👉👉👉Please make a video about how to redirect on different dashboard based on user type using jetstream
@LaravelDaily
@LaravelDaily 3 года назад
This is what you need: github.com/laravel/fortify/issues/77
@vilandex5089
@vilandex5089 3 года назад
whats the fake filler extension is called
@LaravelDaily
@LaravelDaily 3 года назад
Fake filler
@vilandex5089
@vilandex5089 3 года назад
@@LaravelDaily thanks
@dukewilliams6142
@dukewilliams6142 3 года назад
laravel should bring the documentation for jetstream and inertia inside the main site.
@alfievillarin3554
@alfievillarin3554 3 года назад
Optimistic + Professionalism = Laravel Business
@cowdickerson8102
@cowdickerson8102 3 года назад
what about profile photos ?
@listico7932
@listico7932 3 года назад
So we have the dashboard section forms "powerd' by Livewire, it give us some reactivity without page reload. And the input field values are passed to laravel fortify by Livewire, and at the backend fortify takes care of input validation and updates. So we can update user information, using livewire and fortify It is clear so far. But what if we want to jump a bit forward and we want to register the user using livewire. At the moment user creation is taken care by fortify as we submit the registration form we submit it to the register route. Is there any special how fortfy create new users? I mean if i do a livewire component for user registration i could save the user with livewire exatly the same way how fortify would save it. Right? So a livewire CreateUser method: public function register() { $this->validate(); $user = User::create([ 'email' => $this->email, 'password' => Hash::make($this->password), ]); auth()->login($user); return redirect('dashboard'); } Would be result thesame as the fortify version of user creation: public function create(array $input) { Validator::make($input, [ 'name' => ['required', 'string', 'max:255'], 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 'password' => $this->passwordRules(), ])->validate(); return User::create([ 'name' => $input['name'], 'email' => $input['email'], 'password' => Hash::make($input['password']), ]); } Am I right? or is there any difference?
@PovilasKorop
@PovilasKorop 3 года назад
Yes, you're probably right, although I haven't tried it myself, Jetstream has Livewire/Inertia only in internal pages, but not on login/registration forms, and I personally like it that way, not sure why login/register form would need the reactivity of Livewire.
@luizerajoga1506
@luizerajoga1506 3 года назад
how do I make to enable the profile image section form? could u help me?
@promoahorroschat574
@promoahorroschat574 3 года назад
how to know, the current user id??
@MePeterNicholls
@MePeterNicholls 2 года назад
I dislike the lock in to its way of working (without a lot of effort).
@eloquent2200
@eloquent2200 Год назад
Thank you for your work!
@jszoja
@jszoja 3 года назад
Outstanding presentation! Thank you.
@pandurangarao6026
@pandurangarao6026 Год назад
Brilliant explanation.
@dannorcott773
@dannorcott773 3 года назад
Thanks - really nice intro.
@emmanuelchan8218
@emmanuelchan8218 3 года назад
Thanks for the explanation. How about how to decouple Tailwind CSS? Or is it just easier to go with Fortify and Laravel UI? Thanks.
@PovilasKorop
@PovilasKorop 3 года назад
You can't decouple Tailwind from Jetstream. Then yes, you need to go with Fortify and whatever front-end framework you want, for Bootstrap yes you can use Laravel UI.
@phukhuongnguyen2570
@phukhuongnguyen2570 3 года назад
please demo how to use command line : php artisan vendor:publish --tag=jetstream-views
@rafaelcardosotrentin6491
@rafaelcardosotrentin6491 3 года назад
Thank u
@GergelyCsermely
@GergelyCsermely 3 года назад
Thank You for this Video, very interesting. May I have a question? If I edit this file app/actions/...Fortify/UpdateUserProfileInformation.php Could it couse a problem I Laravel will update Fortify? Should I make a Copy of this controller and use a copy and change the controller in the published view files? Thx.
@popplestones886
@popplestones886 3 года назад
no, you can modify it, that's why it was copied to your project, just don't modify the files in vendor
@GergelyCsermely
@GergelyCsermely 3 года назад
@@popplestones886 Thanks!!!
@jaysonverana8839
@jaysonverana8839 3 года назад
Hi, how do you add a gender field wherein the data on the database will show again in the dropdown select field?
@PovilasKorop
@PovilasKorop 3 года назад
Not sure what is the question here: same thing - you add a DB field (possible ENUM for gender? not sure), then in Blade, and $input['gender'] when saving.
@MikeArtemiev
@MikeArtemiev 3 года назад
Povilas, can you suggest simplest way to make number formating in liveware form input?
@PovilasKorop
@PovilasKorop 3 года назад
Depends on what you mean by "number formatting", you can always auto-validate the number inside updated() method, or use a package, like this one: davidhallin.com/blog/livewire-masks-with-manny/
@moustaphamangane5390
@moustaphamangane5390 3 года назад
Hello,Thank for you
@ctacello
@ctacello 3 года назад
Awesome! Thank you!
@mori181186
@mori181186 3 года назад
Do you plan use Jetstream in QuickAdminPanel or not? :)
@PovilasKorop
@PovilasKorop 3 года назад
No, these are totally different approaches, with QuickAdminPanel we stick with old "proven" technology and pure simple Laravel + Blade, at least for now. We don't want to overcomplicate the generated code for our customers.
@achmedislamichernawan7070
@achmedislamichernawan7070 3 года назад
i'm new with laravel. I just started learn Laravel from version 7. When Laravel 8 released (including jetstream), I tried using it. And I confuse with that x-jet-something, where the heck that reference from XD
@tannercampbell
@tannercampbell 3 года назад
Those are the named components. If using with Inertia and Vue the components would be resources/js/Jetstream. There you will find all the components used in the app
@achmedislamichernawan7070
@achmedislamichernawan7070 3 года назад
@@tannercampbell yes, but I confused with the "jet". And I opened the documentation for blade component, there's nothing like "x-jet" in there. But thank god, I finally found it. I wish this video came early, hahaha 😂
@tatendawilson3057
@tatendawilson3057 3 года назад
@Achmed Islamic Hernawan checkout this tutorial laracasts.com/series/Blade-Component-cookbook it's like a magic of working with css.
@LetTheWritersWrite
@LetTheWritersWrite 3 года назад
I think jetstream is going astray from the philosophy Laravel started with and solving a problem no one had. It's a very highly opinionated design. It's overly complex. I just don't get it.
@whatamiwitnessing1003
@whatamiwitnessing1003 3 года назад
Where can I select the database table to use for registration and login? I don't want to use the basic one.
@LaravelDaily
@LaravelDaily 3 года назад
It's in config/auth.php of Laravel: github.com/laravel/laravel/blob/2b8f3aa506f1f2463dfdb43b063d17674b86c8cd/config/auth.php#L41
@whatamiwitnessing1003
@whatamiwitnessing1003 3 года назад
@@LaravelDaily I still get this error. "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bpblog2021.users' doesn't exist (SQL: insert into `users` (`gnaam`, `email`, `wachtwoord`, `updated_at`, `created_at`)" when trying to sign up.
@alexanderanastasiadis9284
@alexanderanastasiadis9284 3 года назад
The icons on the right side of input fields is included with Livewire ?
@miro-hristov
@miro-hristov 3 года назад
That's LastPass and Chrome's autoComplete
@alexanderanastasiadis9284
@alexanderanastasiadis9284 3 года назад
Povilas you are from Greece ? Great work but the way thanks :)
@PovilasKorop
@PovilasKorop 3 года назад
No, from Lithuania, our names endings are similar to yours :)
@alexanderanastasiadis9284
@alexanderanastasiadis9284 3 года назад
@@PovilasKorop Ok , thanks
@Jake-bh1hm
@Jake-bh1hm 2 года назад
Hi, thanks for making these videos. They are really helpful to understand the whole Laravel framework. But I am confused about jetstream. I understand that its great for getting things going quick but I keep reading contradicting things about it being API ready. Does jetstream allow for easy api creation or will I have to redo all the routes if I want to create an app that connects to the laravel jetstream website??
@LaravelDaily
@LaravelDaily 2 года назад
What do you mean exactly by easy API creation? Creating API is quite easy in Laravel itself, Jetstream doesn't make it easier or harder, it's a web scaffolding, not that much about API (although it uses Laravel Sanctum internally)
@Jake-bh1hm
@Jake-bh1hm 2 года назад
@@LaravelDaily What I mean by that is for example. If I want to create a web to do app, that allows users to create a to do list. But I also want to create a native iOS app for it. Would I need to write the controllers twice? (I’m a newb with laravel) how would my native iOS app get the list in JSON?
@LaravelDaily
@LaravelDaily 2 года назад
Well yes, twice, one for web interface, one for API. That's how web and API works, it's not specific to Jetstream or even Laravel.
@Jake-bh1hm
@Jake-bh1hm 2 года назад
@@LaravelDaily but why? It’s the same interface .. shouldn’t it be api forward? One api .. two interfaces pulling from the same API?
@LaravelDaily
@LaravelDaily 2 года назад
Not sure what you call API then. If you mean taking data from the same database, then Eloquent is your API. I think you're looking at things too theoretically, just start creating controllers and you will ask more practical questions.
@gal_sergey
@gal_sergey 3 года назад
Спасибо.
@webwordpress6376
@webwordpress6376 3 года назад
was looking for two factor authentication and you didnt even touch it.
Далее
API Platform for Laravel: My First Impression
12:39
Просмотров 3,5 тыс.
Laravel Jetstream: Add CRUD with User Roles
16:51
Просмотров 154 тыс.
小路飞嫁祸姐姐搞破坏 #路飞#海贼王
00:45
Luma AI
1:17
Просмотров 1
Getting started with Laravel Breeze and Jetstream
28:07
Laravel Security: Top 7 Mistakes Developers Make
11:16
9 Tips for Shorter Laravel Code
10:16
Просмотров 61 тыс.
I build a TODO list app with Laravel in 17 minutes.
17:58
小路飞嫁祸姐姐搞破坏 #路飞#海贼王
00:45