Laravel Skeleton
Laravel Skeleton provides a barebones version of Laravel with some added features for extra customizability.
Artisan commands
Creating a custom Authentication Guard
Using a StyleMap
Artisan commands
php artisan make:guard
php artisan make:helper
php artisan make:trait
Creating a custom Authentication Guard
- Create the guard class
php artisan make:guard ExampleGuard
You may use the --example
option to specify that the created guard class should contain some example functionality
php artisan make:guard ExampleGuard --example
- Add an entry into the
guards
property withinconfig/auth.php
'guards' => [
// ...
'custom' => [
'driver' => 'example',
'provider' => 'users'
]
]
- Add an entry into the
$guards
property ofApp\Providers\AuthServiceProvider
protected $guards = [
'example' => 'App\Guards\ExampleGuard',
];
- Create a route using the new authentication guard
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Response;
Route::middleware('auth:custom')->get('/user', function () {
return Response::json(Auth::user());
});
Using a StyleMap
The StyleMap helper class can be useful in generating styles based on user settings
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Auth;
use App\Helpers\StyleMap;
Route::middleware('auth:api')->get('/user', function () {
return view('index', [
'vueRootStyle' => StyleMap::create([
'background-color' => Auth::user()->custom_background_color,
'color' => Auth::user()->custom_text_color
])
]);
});
Laravel
Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
If you don't feel like reading, Laracasts can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
VueJS
Vue (pronounced /vjuː/, like view) is a JavaScript framework for building user interfaces. It builds on top of standard HTML, CSS and JavaScript, and provides a declarative and component-based programming model that helps you efficiently develop user interfaces, be it simple or complex.
Laravel Skeleton also includes vue-router, vue-cookies, bootstrap and sass
License
The Laravel Skeleton framework is open-sourced software licensed under the MIT license.