Coder Social home page Coder Social logo

laravel_auth_slate's Introduction

Laravel Auth Slate

Scaffolds an authentication UI in your Nylo project.

Getting Started

In your Flutter project add the dependency:

With Dart:

dart pub add laravel_auth_slate

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

dependencies:
  ...
  laravel_auth_slate: ^1.0.25

Usage

Step 1: Run the below command in your project.

dart run laravel_auth_slate:main publish:all

With Nylo

metro publish:slate laravel_auth_slate

Step 2: Go to config/events.dart and update the following event:

// from
SyncAuthToBackpackEvent: SyncAuthToBackpackEvent<User>(),

// to 
SyncAuthToBackpackEvent: SyncAuthToBackpackEvent<LaravelAuthResponse>(),

Routes

The initial route should be AuthLandingPage.

Go to your routes/router.dart file and update the following:

appRouter() => nyRoutes((router) {
 ...
 router.route(AuthLandingPage.path, (context) => AuthLandingPage(), initialRoute: true); // set to initial route
 
});

Laravel project

Install the Laravel composer package laravel-nylo-auth.

You can install the package via composer:

composer require nylo/laravel-nylo-auth

You can publish with:

php artisan vendor:publish --provider="Nylo\LaravelNyloAuth\LaravelNyloAuthServiceProvider"

Update your .env file

In your Nylo project, navigate to your .env file and update the following line:

APP_URL="https://nylo.dev" // old url

APP_URL="http://examplelaravel.test" // your laravel project url

Now, build and run the app and try to login, register and use the forgotten password page.

Check out the Laravel package here for more information.

Requirements

  • Dart >= 2.19.0
  • Flutter >= 3.10.0

Files generated:

  • Pages
    • LoginPage
    • RegisterPage
    • LandingPage
    • DashboardPage
    • AuthLandingPage
  • Controllers
    • LoginController
    • RegisterController
    • ForgotPasswordController
  • Events
    • LaravelAuthEvent
  • Networking
    • LaravelApiService
    • LaravelAuthService
  • Models
    • AuthUser
    • AuthResponse

Changelog

Please see CHANGELOG for more information what has changed recently.

Licence

The MIT License (MIT). Please view the License File for more information.

laravel_auth_slate's People

Contributors

agordn52 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

laravel_auth_slate's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.