PHP code example of luissobrinho / builder
1. Go to this page and download the library: Download luissobrinho/builder library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
luissobrinho / builder example snippets
public const HOME = '/dashboard';
Gate::define('admin', function ($user) {
return ($user->roles->first()->name === 'admin');
});
Gate::define('team-member', function ($user, $team) {
return ($user->teams->find($team->id));
});
\App\Events\UserRegisteredEmail::class => [
\App\Listeners\UserRegisteredEmailListener::class,
],
'passwords' => [
'users' => [
'provider' => 'users',
'email' => 'emails.password',
'table' => 'password_resets',
'expire' => 60,
'throttle' => 60,
],
],
MAIL_DRIVER=log
php artisan luissobrinho:starter
composer dump-autoload
php artisan migrate --seed
php artisan luissobrinho:activity
App\Providers\ActivityServiceProvider::class,
Activity::log($description);
Activity::getByUser($userId);
activity($description) // will log the activity
php artisan luissobrinho:features
App\Providers\FeatureServiceProvider::class,
Features::isActive($key);
feature($key) // will return true|false
php artisan luissobrinho:logs
php artisan luissobrinho:notifications
Notifications::notify($userId, $flag, $title, $details);
composer
php artisan luissobrinho:forge
->group(function () {
utes/forge.php');
}
FORGE_TOKEN=
FORGE_SERVER_ID=
FORGE_SITE_ID=
composer
'jwt.auth' => \Tymon\JWTAuth\Middleware\GetUserFromToken::class,
'jwt.refresh' => \Tymon\JWTAuth\Middleware\RefreshToken::class,
'api/v1/login',
'api/v1/user/profile',
RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
\App\Models\User::class
php artisan luissobrinho:queue
composer
Laravel\Socialite\SocialiteServiceProvider::class
'Socialite' => Laravel\Socialite\Facades\Socialite::class,
Route::middleware('web')
->namespace($this->namespace)
->group(function () {
'github' => [
'client_id' => 'id code',
'client_secret' => 'secret code',
'redirect' => 'http://your-domain/auth/github/callback',
'scopes' => ['user:email'],
],
composer
composer
protected $middlewareGroups = [
'web' => [
// ...
\App\Http\Middleware\DebugMiddleware::class
],
'api' => [
// ...
]
];
php artisan vendor:publish
php artisan vendor:publish --provider="Luissobrinho\LCrud\LCrudProvider"
php artisan luissobrinho:bootstrap
php artisan luissobrinho:api
php artisan luissobrinho:socialite
php artisan luissobrinho:auditing
php artisan luissobrinho:debugbar