dexperts / authentication
This package will contain all authentication logic and functionality.
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:project
This package is auto-updated.
Last update: 2024-10-29 06:18:31 UTC
README
Authentication package created by Dexperts.
About the authentication package
This package contains all the authentication logic and functionality. It can be imported into your laravel project with composer. This has been built up, for example, to reuse and apply login functionality.
Install the authentication package
Note: you must already have a Laravel project to import this package.
Import the package
- create a folder named
package
in the root directory of your Laravel project. - Open the Terminal in the package folder.
- Enter the
composer create-project dexperts/authentication
command in the Terminal. - The package is created in your package folder.
Setup the package with a route
- Go to your
routes
folder and open theweb.php
file. - Import the package above in the file like this:
use Dexperts\Authentication\Auth;
- Create a new
get
request named/auth
. (You can copy the root / request)
Route::get('/auth/{name}', function($sName) { $oAuth = new Auth(); return view('welcome', [ 'name' => $oAuth->call($sName) ]); });
- Go to the
resource/views
folder and open thewelcome.blade.php
file. - Place somewhere the little piece of code in the php file:
<?= $name; ?>
- $name is needed because the variable in the get request has been defined in the view.
- You all set and run your project.
Enjoy :)!
License
The MIT License (MIT)