PHP code example of ramadan / custom-fresh
1. Go to this page and download the library: Download ramadan/custom-fresh 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/ */
ramadan / custom-fresh example snippets
'presets' => [
'auth' => ['users', 'password_reset_tokens', 'sessions', 'personal_access_tokens'],
],
'table_seeders' => [
'posts' => Database\Seeders\PostSeeder::class,
],
return [
'always_keep' => ['users', 'personal_access_tokens'],
'patterns' => ['oauth_*', 'telescope_*'],
'keep_without_migrations' => ['sessions', 'cache'],
'presets' => [
'auth' => ['users', 'password_reset_tokens', 'sessions', 'personal_access_tokens'],
],
'table_seeders' => [
'posts' => Database\Seeders\PostSeeder::class,
],
'connections' => [
'tenant' => [
'always_keep' => ['tenant_settings'],
],
],
'confirm_in' => ['production', 'staging'],
'replace_migrate_fresh' => false,
];
SHELL
php artisan vendor:publish --tag=custom-fresh-config
SHELL
php artisan fresh:custom users,foo
SHELL
php artisan fresh:custom --keep=users,personal_access_tokens
SHELL
php artisan fresh:custom "users,oauth_*,telescope_*"
SHELL
php artisan fresh:custom --drop=posts,comments
SHELL
php artisan fresh:custom --keep=users --keep-raw=sessions,cache
SHELL
php artisan fresh:custom --except=users
SHELL
php artisan fresh:custom --preset=auth
SHELL
php artisan fresh:custom users --freeze-schema
SHELL
php artisan fresh:custom --keep=posts --with-related
SHELL
php artisan fresh:custom users --database=tenant
SHELL
php artisan fresh:custom users --explain
SHELL
php artisan fresh:custom users --explain --json
SHELL
php artisan fresh:custom --list
SHELL
php artisan fresh:custom --list --json
SHELL
php artisan fresh:custom --keep=users --seed-fresh