Laravel Jetstream: Add CRUD with User Roles

Поделиться
HTML-код
  • Опубликовано: 20 янв 2025

Комментарии • 206

  • @LaravelDaily
    @LaravelDaily  2 года назад +1

    Want more videos about Jetstream? My full 2-hour course of live-coding a Jetstream project: laraveldaily.teachable.com/p/laravel-jetstream-livewire-project?

  • @fullsetupok
    @fullsetupok 2 года назад +2

    Hi, I'm from Argentina. I just want to say that your way of pronouncing words and teaching is very clear.

  • @fhoulbr
    @fhoulbr Год назад +1

    Watching this movie two years later after I finished my project with Jetstream... I see I did make things a bit like you. I really enjoy Jetstream as it's easy to extend functionalities, including queuing Fortify mails easily, or just overriding default user table, etc... it allows you to cut to a few hours what would take days and do it securely. I did easily override the route names as well and got them translated in french.
    Really powerful tool indeed. Developing in the TALL stack is a pleasure for me.

  • @tbass.p3480
    @tbass.p3480 3 года назад +8

    navigation-dropdow now is navigation-menu in news versions of jetstream, but the tutorial help so much, thanks from brasil :D

  • @mushypeeze3545
    @mushypeeze3545 4 года назад +3

    Brilliant example which I've implemented in my website. Had to make a few changes to accomodate teams but the rest was perfect. Thanks for saving me hours of work!

  • @Rodmerchan
    @Rodmerchan 4 года назад +3

    Thanks! this tutorial has helped me understand the stack much better, and made much easier to add features in a streamlined way.

  • @codingbugs4204
    @codingbugs4204 2 года назад +1

    i don't know why i've got this error when i try to register a user
    SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`myproject`.`role_user`, CONSTRAINT `role_user_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE) (SQL: insert into `role_user` (`role_id`, `user_id`) values (2, 7))

  • @turdakhov
    @turdakhov 3 года назад

    You are my best teacher of Laravel! I am so much obliged to you!

  • @skatesessiesnuenen8826
    @skatesessiesnuenen8826 4 года назад +2

    Awesome tutorial thanks man! This is really helping me out when studying for my laravel exam

  • @haythamaldamen3578
    @haythamaldamen3578 2 года назад

    I am the subscriber No. 100,000 congratulation!!

  • @OnlyJavascript
    @OnlyJavascript 3 года назад +3

    when i try to create or edit task i get 403 forbidden error.

  • @andreallen6823
    @andreallen6823 3 года назад

    I don't see the nav links on Admin dashboard, and I am getting this error when I try to register a user "SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`promedic`.`role_user`, CONSTRAINT `role_user_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE) (SQL: insert into `role_user` (`role_id`, `user_id`) values (2, 2))"

  • @TarunKumar-t1q
    @TarunKumar-t1q 9 месяцев назад

    thanks for making this helpful video,but i have question i make allpossible this to admin access the task but when i make this condition @can(task_access) then in admin control it return false why?

  • @jamesjameslee8217
    @jamesjameslee8217 3 года назад +1

    Thank you for this video, this is exactly what I needed for my current project

  • @cuauhtemoclemus7660
    @cuauhtemoclemus7660 3 года назад +2

    very useful, but how could I add a new role later? I already added the permission roles but it did not accept them

  • @AlfredoElizondoLife
    @AlfredoElizondoLife 4 года назад +4

    Great didn’t know about the route name.* i was doing regular php to check for the name with contains.

  • @pericarajcevic1724
    @pericarajcevic1724 2 года назад

    I tried this and it doesn't work any more, any new ways to do this or a solution for the new updated version

  • @luiswetowkn
    @luiswetowkn 3 года назад +1

    Help me plese!!!
    SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`laravel_tester`.`role_user`, CONSTRAINT `role_user_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE) (SQL: insert into `role_user` (`role_id`, `user_id`) values (2, 5))

  • @Titanen89
    @Titanen89 3 года назад +1

    the password won't get hashed for me when i create a user, it get stored in plane text

  • @ElProfeValen
    @ElProfeValen 4 года назад

    Hi, a error Manifest appear wend publish: "php artisan vendor:publish --tag=jetstream-views" the suggestion to fix this issue is: Missing Mix Manifest File
    Error:
    The Mix manifest does not exist. (View: D:\Software\App\WS32\www\Resolut\Portal\Engine
    esources\views\layouts\guest.blade.php)
    Did you forget to run npm install && npm run dev?

  • @claudiocapistrano
    @claudiocapistrano Год назад

    How he open the 'search box'?

  • @alwynsonhinay5172
    @alwynsonhinay5172 8 месяцев назад

    I need some little help i just download the repository and its fine what im worried is that the TASK and USERS is not showing in the dashboard what should i do sir...

    • @alwynsonhinay5172
      @alwynsonhinay5172 8 месяцев назад

      drive.google.com/file/d/1Wti3yxvwz7ZGQQ3G0Jii9FwO5N7D9fdm/view?usp=sharing

    • @alwynsonhinay5172
      @alwynsonhinay5172 8 месяцев назад

      please reply Laravel Daily

    • @alwynsonhinay5172
      @alwynsonhinay5172 8 месяцев назад

      i have also received an error from register :
      SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`laravel`.`role_user`, CONSTRAINT `role_user_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE) (SQL: insert into `role_user` (`role_id`, `user_id`) values (2, 2))

    • @LaravelDaily
      @LaravelDaily  8 месяцев назад

      Sorry I don't have time unfortunately for personal debugging, from your error it's not clear what you misconfigured.
      Or the repository may be really old by this point, the video is from a few years ago, haven't checked it since then.

  • @jastinzeillauretacabudol1189
    @jastinzeillauretacabudol1189 2 года назад

    how can i access the admin panel sir

  • @adgjoed6518
    @adgjoed6518 4 года назад +2

    Спасибо большое. Даже английский начал учить)

  • @vivdroid
    @vivdroid 4 года назад

    exactly what i requested last 2week. thanks for tutorial.

  • @maxnyu4445
    @maxnyu4445 3 года назад

    sir on routing issue why did you uses resource(name:'',etc) code .. i tried it but on my side on the name its saying unexpected syntax ... why am lost?

  • @hossamhasnaoui1796
    @hossamhasnaoui1796 8 месяцев назад

    i couldn't find navigation-dropdown ???

  • @callumb4980
    @callumb4980 2 года назад

    What is the purpose of teams? I always assumed it was for role management but what would be the usecase for using jetstream with teams enabled

    • @LaravelDaily
      @LaravelDaily  2 года назад

      Teams are companies, with multiple users in each team/company. Those users may or may not have roles.

  • @misbahululum9349
    @misbahululum9349 3 года назад

    i have some issues like this "General error: 1364 Field 'description' doesn't have a default value"
    please help me to solve it

  • @muthuarts4484
    @muthuarts4484 Год назад

    What text editor is this .. go to definition inbuilt or not?

  • @SKIDDOW
    @SKIDDOW 3 года назад

    I tried to view components like this, but its getting errors.
    If I have index.blade.php file in users directory I need to add jet-component to render user list(Grid).
    For example I need to render users-grid.blade.php in index.blade.php using
    Can you please guide?

    • @LaravelDaily
      @LaravelDaily  3 года назад +1

      You need to actually create the full component yourself, it's not just like you write x-jet-anything and it will magically work. Please read the official docs about Blade components.

  • @fotrino
    @fotrino 4 года назад +2

    Hi @Povilas, could you show an example of laravel-permission + jetstream ?

    • @PovilasKorop
      @PovilasKorop 4 года назад

      I don't think it would be too different from this example, it would be the same @can() in Blade, and hasPermission in middleware. It's not about Jetstream at all.

  • @sodomousprime
    @sodomousprime 3 года назад

    Old data does not work when you reuse x-jet-input in your own custom forms. Can you show how to achieve this?

  • @JJ-ot3ps
    @JJ-ot3ps 2 года назад

    hi, does the livewire comes with vue?

  • @miftakhusysyiroth9301
    @miftakhusysyiroth9301 3 года назад

    You help me so much, I love your videos

  • @zodixh3543
    @zodixh3543 3 года назад

    I did the same and the password doesnt hash, and i cant create more than 1 user with the same role, pls help

  • @blokkaliwon7794
    @blokkaliwon7794 3 года назад

    Sir, I want to ask, where is the login controller in laravel 8, I want to add a alert success when the user successfully logs in and redirects to the dashboard page.?

    • @LaravelDaily
      @LaravelDaily  3 года назад +1

      There's no Login controller in default Laravel 8, it depends on which starter kit you use - Breeze, Jetstream, UI or other.

    • @blokkaliwon7794
      @blokkaliwon7794 3 года назад

      @@LaravelDaily so, where is the position, i have to use alert in Jetstream

    • @LaravelDaily
      @LaravelDaily  3 года назад +1

      Sorry I can't answer that in a RUclips comment, you need to look at Jetstream docs and the code inside.

  • @luiscastro4931
    @luiscastro4931 Год назад

    Why in your video give the vendor folder but in the repository files there is not that folder

    • @LaravelDaily
      @LaravelDaily  Год назад

      Vendor isn't pushed to the repository, it's ignored in gitignore. To get the vendor, run "composer install".

  • @notkylo1881
    @notkylo1881 3 года назад

    Subscribed!! I need a teacher like you. Thank You Very Much Sir!!

  • @hichamalaoui34
    @hichamalaoui34 3 года назад +1

    Excellent tutorial. Thank you loads :)

  • @jayrachi_bcd
    @jayrachi_bcd 2 года назад

    SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`usersexam`.`role_user`, CONSTRAINT `role_user_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE) (SQL: insert into `role_user` (`role_id`, `user_id`) values (2, 3)) I need help on resolving this

  • @itismadebymonkey
    @itismadebymonkey 2 года назад

    Best teacher ever!

  • @maxnyu4445
    @maxnyu4445 3 года назад +1

    SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`adcity`.`role_user`, CONSTRAINT `role_user_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE) (SQL: insert into `role_user` (`role_id`, `user_id`) values (2, 3)) help me with this

  • @jeremiaholu-daniel3217
    @jeremiaholu-daniel3217 3 года назад

    The roles and permissions part is different in the present Jetstream version. They now use teams. How can I implement the roles and permissions now?

    • @LaravelDaily
      @LaravelDaily  3 года назад

      From what I remember, you can disable teams at the installation moment.

    • @jeremiaholu-daniel3217
      @jeremiaholu-daniel3217 3 года назад

      @@LaravelDaily Yes, you're right. Don't mind me. Spoke too soon. I thought the user management features you were referring to came with Jetstream itself. Now I see you coded that yourself. Thanks.

  • @andreallen6823
    @andreallen6823 3 года назад

    I am getting this problem "Target class [App\Http\Controllers\App\Http\Controllers\TaskController] does not exist."

    • @LaravelDaily
      @LaravelDaily  3 года назад

      Because this part App\Http\Controllers\ is repeated twice. If you add "use" statement on top, you don't need to use full path in the route statement.

    • @andreallen6823
      @andreallen6823 3 года назад

      @@LaravelDaily Thanks I got it. But I am a complete beginner so I'm lost whenever you don't go through the steps, especially after you add the table for the in 'Tasks'. I can figure out that I can copy and paste code from the repo, but I am not sure about anything from 11:24 onwards where you create the UserController since you don't show any steps in the terminal from that point. I am trying to create a project which is a Medical Web app, but haven't made any progress at all to meet my first milestone as I am totally new to Laravel. My first milestone is to create the dashboard for Admin, Doctor, Patient with the roles and permissions. For example, Doctors will have permission to add medical data to the database, and users can search medical info and stuff like that, just like a regular medical app.

    • @LaravelDaily
      @LaravelDaily  3 года назад +1

      @@andreallen6823 ok I understand now, but sorry this channel is not for complete beginners in Laravel, I don't want to stop and explain every piece, that would make my videos 1-hour long.

  • @NikhilSharma-bw9yw
    @NikhilSharma-bw9yw 4 года назад

    How SPA method works on jetstream ??

  • @Kira-gc2jg
    @Kira-gc2jg 4 года назад

    can i use has role in the controller?

  • @richardhoyle7778
    @richardhoyle7778 4 года назад

    Having a bit of a problem when I create a new user the user password is not getting hashed. The input in to the database is just what is entered in the create form.

    • @KarthikMadathil
      @KarthikMadathil 3 года назад +2

      use Hash::Make('password')

    • @Malithsen
      @Malithsen 3 года назад +1

      @@KarthikMadathil in which folder this code should be placed? please help...

    • @KarthikMadathil
      @KarthikMadathil 3 года назад

      @@Malithsen not in any folder ..
      you must hash the request password from the controller before inserting

    • @foxrocks76
      @foxrocks76 3 года назад +1

      @@Malithsen You would add that wherever you are saving the password to the database. So, for example if you were in the users controller create method, it might look like this:
      public function create(Request $request, User $users){ $new_user = $users->create(['name' => $request->name, 'password' => bcrypt($request->password)]); }
      I used bcrypt() but Hash::Make is the same thing.

  • @nouira2185
    @nouira2185 4 года назад +1

    is it possible to use jetstream teams to manage roles and permission ? thank you!

    • @PovilasKorop
      @PovilasKorop 4 года назад

      Haven't tried it personally. Those are actually different topics: roles/permissions are about access to some function or menu item, and teams are about access to the entry of that particular team, so multi-tenancy. Not sure, as I said, haven't tried Jetstream with teams.

  • @maxnyu4445
    @maxnyu4445 3 года назад

    help me with this Undefined class constant 'HTTP_FORBIDDEN please .. am getting this when am press create new task

  • @muhammadsabiil3482
    @muhammadsabiil3482 3 года назад

    anyone know whats plugin they use when he click dashboard is direct to dashboard file?

    • @MrMoorewi
      @MrMoorewi 3 года назад

      what code editor do you have?

    • @muhammadsabiil3482
      @muhammadsabiil3482 3 года назад

      @@MrMoorewi vscode, this plugin just work on php stream?

    • @MrMoorewi
      @MrMoorewi 3 года назад

      @@muhammadsabiil3482 Use "laravel goto view" plugin

    • @muhammadsabiil3482
      @muhammadsabiil3482 3 года назад

      @@MrMoorewi thanks, btw this is laravel 8?

    • @MrMoorewi
      @MrMoorewi 3 года назад

      @@muhammadsabiil3482 yes

  • @MarcelloPato
    @MarcelloPato 11 месяцев назад

    AWESOME as usually. Can't I use the middleware(['auth:sanctum']) to auth the user?

    • @mwesigwaarnold4805
      @mwesigwaarnold4805 9 месяцев назад

      hello does that mean we create a separate admin pages

  • @makerstorage
    @makerstorage 2 года назад

    inertia version of this video please

  • @hertzstein
    @hertzstein 4 года назад

    your channel is very very useful

  • @aadazq5257
    @aadazq5257 3 года назад

    why i got 403 forbidden

  • @WallyJ2K
    @WallyJ2K 3 года назад

    Will this work in a similar fashion for Breeze?

  • @shahidjutt5656
    @shahidjutt5656 3 года назад

    bootstrap is not working in laravel 8,tailwind is ok but its little bit confusion so how can we use bootstrap inside laravel 8 project

    • @LaravelDaily
      @LaravelDaily  3 года назад +1

      You can still use Bootstrap in Laravel 8, with the same package Laravel UI.
      Or, there's also JetStrap: ruclips.net/video/Pd7EF2rkyOM/видео.html

    • @shahidjutt5656
      @shahidjutt5656 3 года назад

      Thanks sir, 🙂

    • @shahidjutt5656
      @shahidjutt5656 3 года назад

      Is there any plugin or extension for vs code like laravel-idea for php strom?

    • @LaravelDaily
      @LaravelDaily  3 года назад +1

      I don't use VS Code, so no idea.

    • @shahidjutt5656
      @shahidjutt5656 3 года назад

      @@LaravelDaily i try jetstrap but it work fine inside Jetstream files when i try to use Bootstrap outside the Jetstream like i create a view name as contact. Blade. Php and paste Bootstrap form inside it, it wasn't work😢

  • @richardhoyle7778
    @richardhoyle7778 4 года назад +2

    So getting use to Jetstream; was wondering if there is any way you would consider doing a class covering all of this, but in a bit more detail? And how about installing a template in the front end?

  • @DarkWebCode
    @DarkWebCode 4 года назад

    how to change the jetstream logo ???

    • @LaravelDaily
      @LaravelDaily  4 года назад

      It is in authentication-card-logo.blade.php component:


      Read about publishable components here: jetstream.laravel.com/2.x/stacks/livewire.html#components

  • @NikhilSharma-bw9yw
    @NikhilSharma-bw9yw 4 года назад

    Hello sir
    can you help me out with creating a curd method in Laravel jetstream on SPA base application

    • @PovilasKorop
      @PovilasKorop 4 года назад

      By SPA you mean the Inertia stack? Sorry I haven't worked with Inertia, I prefer Livewire.

  • @bitsuhaimi
    @bitsuhaimi 3 года назад

    Hi Sir, i am new in Laravel. I am trying to apply Laravel 8 and Jetstream, yet I found this video. I did enable the Jetstream Teams features and when I trying to add this user roles permissions features, I ve got an error. Can you show or guide what makes the default user registration fails, and adding users from list saving the password without hash?

  • @casualquest84
    @casualquest84 Год назад

    Many thanks for this.

  • @riubotin
    @riubotin 2 года назад

    My route look like this.
    Route::get('/', function () {
    return view('welcome');
    });
    Route::middleware([
    'auth:sanctum',
    config('jetstream.auth_session'),
    'verified'
    ])->group(function () {
    Route::get('/dashboard', function () {
    return view('dashboard');
    })->name('dashboard');
    });
    //I add this
    Route::resource(name:'tasks', controller: \App\Http\Controllers\TasksController::class);
    //but i found an error. I create new controller named TasksController. I follow all step in video. any solution?
    ParseError
    syntax error, unexpected ':', expecting ')'

    • @LaravelDaily
      @LaravelDaily  2 года назад

      That word "controller:" is a hint from my PhpStorm, it's invisible, it's not part of the code.

    • @riubotin
      @riubotin 2 года назад

      @@LaravelDaily Thanks Sir, I'll try again

  • @sachinsalaskar2387
    @sachinsalaskar2387 3 года назад

    Thanks for this much needed tutorial. I tried your code but seems i'm no longer admin and cant access other pages. how to change user to admin?

  • @arslanjaved5625
    @arslanjaved5625 4 года назад

    How do you store your CRUD data?

  • @popplestones886
    @popplestones886 3 года назад

    I was hoping you would use the roles built into jetstream.

  • @misterjaypeasmith
    @misterjaypeasmith 2 года назад

    I’m creating a language school management platform to learn more Laravel, I am up and running with Jetstream with Teams.
    I need
    - super admin (god mode)
    - teachers
    - companies
    - students
    - managers (view all students and reports)
    - courses
    - teachers members
    - students members
    I was thinking of using the Teams feature in the place of Companies in my example, but is this a good idea or should I just start from scratch?

    • @LaravelDaily
      @LaravelDaily  2 года назад

      The only way to answer this question is to try and use Teams and see if it fits, you will see only later if there are any issues.

  • @stalerideas
    @stalerideas 3 года назад

    Great video, thanks a lot!!

  • @bvivekvivekbas
    @bvivekvivekbas 3 года назад

    Thanks a lot. Very helpful.

  • @mdsuzayethossan
    @mdsuzayethossan 2 года назад

    If I use Laravel Jetstream in my web development project. At the same time, Could i use css framework bootstrap? I want to use Laravel Jetstream for beautiful authentication design and functionalities. But I will use css framework bootstrap for frontend design. Hopefully I can explain to everyone what I want to do.

  • @chrisdedavid1860
    @chrisdedavid1860 Год назад +2

    Jetstream is supposed to save time, but having to learn it all, and be forced to do things certain ways can cost a lot of time also. When there are issues, there's always the need to figure out how to exactly do something... can't just try it a different way like when creating own code. I use Jetstream sometimes, but I still dislike some things with it even though I've got some projects with it.

    • @maurolucasuamusse3197
      @maurolucasuamusse3197 Год назад +1

      I'm a developer, I can't even interpret all the code that was in my system because of these things

  • @ryanolson4844
    @ryanolson4844 3 года назад +2

    I find the issue with this and other videos by this creator is he copies code from somewhere (which we all do) then turns around and says we need to add updates to the code we copied, then clips to the finished code but doesnt see what or why. It would be nice to see an expanded video of what he is doing so the logic of why is made clear

  • @jailsoncarneiro4936
    @jailsoncarneiro4936 4 года назад

    Great Content! Thank You for share. Helped me a lot... ;)

  • @张鹏程-n6d
    @张鹏程-n6d 4 года назад

    Hello, what plug-ins are installed in your Google browser?

    • @PovilasKorop
      @PovilasKorop 4 года назад +2

      Visible ones: Pocket, Buffer, Trello, Fake Filler, Lastpass, Todoist, Loom, Adblock

  • @sergey_gabrielyan1001
    @sergey_gabrielyan1001 4 года назад

    Hello, as I understood from your video, can the admin know the user password?

    • @LaravelDaily
      @LaravelDaily  4 года назад

      In this case, admin creates the user with password, but you can change it to the invitation system where user sets their own password. Here's a demo video: ruclips.net/video/GMeP793EC0o/видео.html

    • @sergey_gabrielyan1001
      @sergey_gabrielyan1001 4 года назад

      Thank you so much

  • @morgane1762
    @morgane1762 3 года назад

    Was enjoying the tutorial however I found 2 issues so far
    1) Instead of Navigation-dropdown blade I have Navigation-menu blade. 2 On adding the route I am getting a syntax error with following:
    Route::resource(name:'tasks', controller:\App\Http\Controllers\TaskController::class); Its quite difficult to follow the video at times

    • @morgane1762
      @morgane1762 3 года назад

      I corrected the syntax error following the sytnax on github repository
      i,e. Route::resource('tasks', \App\Http\Controllers\TaskController::class); however I do not have Tasks on the menu even tho have made identical changes to the Navigation-menu blade

    • @morgane1762
      @morgane1762 3 года назад

      Have now managed to log in with Task Menu displayed. The 2 earlier points I referred to are still valid, i.e. Navigation-menu blade rther than Navigation-dropdown and route syntax used for TaskController when following video

  • @abhinavgyawali3253
    @abhinavgyawali3253 4 года назад

    Hi Povlias!
    It would be really nice if you could make a video about laravel best practices.
    Thanks!

    • @PovilasKorop
      @PovilasKorop 4 года назад +1

      It's impossible to make a video about ALL best practices, look at how many of them there are, I recommend this repository: github.com/alexeymezenin/laravel-best-practices

  • @Kira-gc2jg
    @Kira-gc2jg 4 года назад

    do you use the spatie package in your video?

    • @PovilasKorop
      @PovilasKorop 4 года назад +1

      No, it's custom code, without packages.

    • @Kira-gc2jg
      @Kira-gc2jg 4 года назад

      @@PovilasKorop owhh well, thanks for your response :)

  • @vasudevane.p5079
    @vasudevane.p5079 4 года назад

    Which is better tailwind or bootstrap

    • @PovilasKorop
      @PovilasKorop 4 года назад +2

      Whatever you prefer personally.

    • @AlfredoElizondoLife
      @AlfredoElizondoLife 4 года назад

      Once tailwind gets more mainstream and you start finding more and more tailwind headless components , honestly tailwind will provide better and faster flexibility for customization, although I haven’t seen BS5 in deep so maybe I can be mistaken here.

  • @rigietamala7058
    @rigietamala7058 4 года назад

    Good day. Thank you for the tutorial, it really helped me a lot. I have last question, If I will add some tab/module in the system aside from Task CRUD, for instance its Product CRUD, should I add modify the middleware and roles & permission specifications to hide the new crud that I created? or the new crud will have permission automatically?

    • @PovilasKorop
      @PovilasKorop 4 года назад +2

      No, permissions don't come automatically, you need to create them manually yourself.

    • @rigietamala7058
      @rigietamala7058 4 года назад

      @@PovilasKorop Noted. Thank you :)

  • @vokalout
    @vokalout 4 года назад

    I really like how laravel 8 looks and I wish to use it someday. I don’t like the blade components, how the controller calls on web.php file is and other things.
    Is there a way to upgrade/do a fresh install of laravel 8 while keeping settings from laravel 7?
    P.S: I am well familiar with laravel 7 and using bootstrap

    • @PovilasKorop
      @PovilasKorop 4 года назад +1

      Yes it's totally possible to upgrade to Laravel 8 without using any Jetstream, Blade components or new routes. But, of course, I can't explain all the details of that in one RUclips comment, please read official upgrade guides.

    • @PovilasKorop
      @PovilasKorop 4 года назад +2

      Decided to shoot a full video with a demo of upgrading, here you go: ruclips.net/video/mPBkYdrOEdQ/видео.html

    • @vokalout
      @vokalout 4 года назад

      @@PovilasKorop Thanks a lot!

  • @ericksonsv
    @ericksonsv 4 года назад

    Very helpful thanks!...

  • @IlPandax
    @IlPandax 4 года назад

    I learned "request()->routeIs('route_name')". Is it standard Laravel? Cooool.
    Mr. Korop I have a question: may I write "User::create($fields)->roles()->attach([1,2])"? User::create returns the user, so why the second row? Readability? :)

    • @PovilasKorop
      @PovilasKorop 4 года назад +1

      I don't think it would work but maybe, not sure. And in that case, we need to return the user, from what I remember, so we need that variable.
      And yes, routeIs is default Laravel.

    • @IlPandax
      @IlPandax 4 года назад

      @@PovilasKorop Great, thanks!

  • @nrzaly
    @nrzaly 4 года назад

    Hi, please make video tutorial how to configure phpstorm like your.

    • @PovilasKorop
      @PovilasKorop 4 года назад +2

      Already have a few videos on that:
      ruclips.net/video/NCEJiMsJVLs/видео.html
      ruclips.net/video/8aN6d8YT5AI/видео.html
      ruclips.net/video/o5WJIS9yWCo/видео.html

  • @llBestBoyll
    @llBestBoyll 2 года назад

    Gg man 🔥👏🏼

  • @ronnielopez6684
    @ronnielopez6684 3 года назад

    Nice video

  • @bebebeb6498
    @bebebeb6498 3 года назад +1

    Very Thx you 👍

  • @alikaram98
    @alikaram98 4 года назад

    thanks for tutorial :D

  • @SaboTak
    @SaboTak 3 года назад

    :c When I edit some user not update :c help :c

    • @SaboTak
      @SaboTak 3 года назад

      Look like update but not really changed the information :c

  • @davidsonzed
    @davidsonzed 4 года назад

    Hello sir, can you make a video on how to use a different dashboard if the user is not admin? where that specific user can only manage his own data based on his user id. User Dashboard will show only his profile information and anything that belongs his own user_id. Can you please make a video on how to do this.
    Thank you again for your excellent tutorials.

    • @PovilasKorop
      @PovilasKorop 4 года назад +1

      That thing is called multi-tenancy, here's one of my videos about it: ruclips.net/video/nCiNqboYFVQ/видео.html (also you can google "multi tenancy laravel")

    • @davidsonzed
      @davidsonzed 4 года назад

      @@PovilasKorop Thank you so much. ❤

    • @davidsonzed
      @davidsonzed 4 года назад

      @@PovilasKorop Thank you sir, I watch the video and but what I need is if I am admin user, so see all hotels and booking. Can you show how to do that as well. Thank you

    • @PovilasKorop
      @PovilasKorop 4 года назад +1

      @@davidsonzed just don't use multi-tenancy on queries for the admin. Sorry I can't shoot a video for your specific individual situation.

  • @ControlAltSuprimir
    @ControlAltSuprimir 4 года назад +2

    Dude what the hell? You started really good with tasks but at the moment of users and permisions you went from 10 to 100, I can't reproduce what you did there :(
    I'm giving my best to do what you did there now lol

    • @PovilasKorop
      @PovilasKorop 4 года назад +2

      From 10 to 100? Where are you struggling exactly? And the repository is available, the link is in the description of the video, you can check the final code.

    • @ControlAltSuprimir
      @ControlAltSuprimir 4 года назад

      @@PovilasKorop I tried to do this all by myself instead of downloading and installed your repository, well now I'm succeeding understanding everything (Yay!).
      But I have one problem on creating users from the admin, it isn't hashing the passwords, so I put a hash in the middle way to do solve this problem but I'm not sure if you forgot to do this or if this is a problem from me.
      Thanks for your hard work dude!

  • @manishkl1
    @manishkl1 4 года назад

    Hey Sir, could you remind me about multitenant (user) series that you had done sometime back? I am facing issue with laravel 8 multi user login, specially regarding redirect to different home for each user. Why different home? Ans: each user type eg admin and employee, manager will have different homes and url to logon, www.empwork/admin will point to admin.home and employee will point to emp.home, each user type has to have eloquent relationship that the other user types are not having, eg Admin's job is to control general office administration tasks whereas employees has roles and each role has certain set of duties.... Fun having complex projects!

    • @PovilasKorop
      @PovilasKorop 4 года назад +1

      Don't remember about the "series", but this method worked a while ago: laraveldaily.com/redirect-login-register-add-method/
      But if you use Fortify in Laravel 8, that method feature is not implemented, there's an issue opened that you can follow: github.com/laravel/fortify/issues/77 (or try to submit a Pull Request yourself?)
      Of course, you may redirect everyone to the same page, and then inside of controller for that page make a check and make another redirect to wherever you want.

    • @manishkl1
      @manishkl1 4 года назад

      @@PovilasKorop protected function redirectTo()
      {
      if (auth()->user()->role_id == 2) {
      return '/emp';
      }
      else
      return '/home';
      }
      did not work and not using jetstream

    • @PovilasKorop
      @PovilasKorop 4 года назад

      @@manishkl1 so what are you using? Laravel UI? Or your own custom register form/controller? Sorry, I can't debug your individual situation for you.

    • @manishkl1
      @manishkl1 4 года назад

      @@PovilasKorop Laravel UI

    • @PovilasKorop
      @PovilasKorop 4 года назад +1

      @@manishkl1 did you add it to LoginController? Or to AppServiceProvider? Try both. If it doesn't work, then it means this is disabled in Laravel 8 for some reason.

  • @Kira-gc2jg
    @Kira-gc2jg 4 года назад

    good tutorial thankss :)

  • @MrJon-ok7nd
    @MrJon-ok7nd 3 года назад

    Clear!

  • @shishirkumarsky
    @shishirkumarsky 4 года назад

    I agree with you. I was also uncomfortable to use jetstream

  • @arealisticdreamer
    @arealisticdreamer 3 года назад +2

    Love you way on cut off "behind the scene" stuffs, just focus on a bigger picture.

  • @jarosawbujok5160
    @jarosawbujok5160 4 года назад

    There is a slight flaw:
    After adding a new user, his password is saved in the database as plain text!

    • @PovilasKorop
      @PovilasKorop 4 года назад

      Yes, good catch, missed that thing at the time, someone pointed it out in other comments or via email, I don't remember. Unfortunately can't re-shoot the full video now because of this.

    • @topnn
      @topnn 4 года назад

      @@PovilasKorop Thank you for the good content! I have also the same problem an unfortunately i can't fix this problem. Could you please suggest how to it fix? Best regards!

    • @PovilasKorop
      @PovilasKorop 4 года назад +1

      @@topnn Well, add bcrypt($password) whenever you need to encrypt the password.

    • @topnn
      @topnn 4 года назад

      @@PovilasKorop Thanks!!

    • @zodixh3543
      @zodixh3543 3 года назад

      @@PovilasKorop where do you add that

  • @mispit2
    @mispit2 3 года назад

    thanks!

  • @jasonlago7888
    @jasonlago7888 3 года назад

    there is two error in this tutorial :D
    as the two commentor below its is by creating New Task and Editing Task.
    I hope #LarvelDaily helps us this part :) ty

    • @jasonlago7888
      @jasonlago7888 3 года назад

      I got New Task..now finding something at Edit task.. its 403
      THIS ACTION IS UNAUTHORIZED.
      idk where am I lacking..

  • @GergelyCsermely
    @GergelyCsermely 3 года назад

    Thanks.