Website Portfolio with Laravel and Vue js | Login And Register Sanctum Auth With Vuejs 3

Поделиться
HTML-код
  • Опубликовано: 30 сен 2024
  • Today we are introducing a new series called “Let’s Build Portfolio Website” where we are mostly going to show you how we develop personal portfolio website based on Laravel and Vuejs from scratch
    In this very second episode of “Let’s build Portfolio website”, we are going to see how to Login And Register Sanctum Auth With Vuejs 3.
    Admin dashboard started kit : github.com/sha...
    Front-end Portfolio Website : github.com/sha...

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

  • @enthsz8446
    @enthsz8446 5 дней назад

    Just a tip, put on some background music at a low volume and don't talk too close to the microphone

    • @devstrain
      @devstrain  4 дня назад +1

      Thanks you for suggestion ❤

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

    Anyone facing this error:
    Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes.
    While running the migration, you need to add this line in AppServiceProvider in boot function:
    Schema::defaultStringLength(191);
    Don't forget to import the namespace for Schema

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

    when I make a request via post man on register endpoint, it returns a 500 response(Internal Server Error)

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

      run command:
      composer require laravel/sanctum
      php artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider"
      Add this line to your Api.php
      Route::group([
      'namespace' => 'App\Http\Controllers\Api',
      ], function ($router) {
      Route::post('login', 'AuthController@login');
      Route::post('register', 'AuthController@register');
      Route::post('logout', 'AuthController@logout');
      });
      did not show in the video

  • @SaifulIslam-eo5to
    @SaifulIslam-eo5to Год назад

    give me the css for login page

  • @yamato23488
    @yamato23488 8 месяцев назад +1

    router.beforeEach((to, from, next) => {
    if (to.meta.requiresAuth && !localStorage.getItem('token')) {
    next({ name: 'login' });
    } else if (to.meta.requiresAuth === false && localStorage.getItem('token')) {
    next({ name: 'admin' });
    } else {
    next(); // Continue with the navigation
    }
    });