sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- Download zsh-autosuggestions by
alias sail="vendor/bin/sail" | |
alias sstart="vendor/bin/sail up -d" | |
alias sstop="vendor/bin/sail stop" | |
alias srestart="vendor/bin/sail restart" | |
alias ss="vendor/bin/sail shell" | |
alias ssp="vendor/bin/sail share" | |
alias sexec="vendor/bin/sail exec" | |
alias sa="vendor/bin/sail artisan" | |
alias st="vendor/bin/sail tinker" | |
alias sn="vendor/bin/sail npm" |
# Must run from the root of a Laravel app | |
alias clearlog="truncate -s 0 $PWD/storage/logs/laravel.log" | |
alias clearlogs="truncate -s 0 $PWD/storage/logs/*.log" | |
# Or using git rev-parse | |
alias clearlog="truncate -s 0 $(git rev-parse --show-toplevel)/storage/logs/laravel.log" | |
alias clearlogs="truncate -s 0 $(git rev-parse --show-toplevel)/storage/logs/*.log" |
<?php | |
namespace App\Nova\Actions; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Queue\SerializesModels; | |
use Illuminate\Support\Collection; | |
use Laravel\Nova\Actions\Action; | |
use Laravel\Nova\Fields\ActionFields; |
function calculate_age($birthday) { | |
$birthday_timestamp = strtotime($birthday); | |
$age = date('Y') - date('Y', $birthday_timestamp); | |
if (date('md', $birthday_timestamp) > date('md')) { | |
$age--; | |
} | |
return $age; | |
} | |
//вызов функции |
<?php | |
if (! function_exists('dbd')) { | |
/** | |
* Showing all database queries. | |
* Отображение всех запросов в базу. | |
* | |
* @param null|\Illuminate\Console\Command|\Psr\Log\LoggerInterface $channel | |
*/ | |
function dbd($channel = null) |
<?php | |
if(!function_exists('config_path')) | |
{ | |
/** | |
* Return the path to config files | |
* @param null $path | |
* @return string | |
*/ | |
function config_path($path=null) |
<?php | |
require_once "vendor/autoload.php"; | |
use Symfony\Component\Console\Application; | |
use Illuminate\Database\Console\Migrations; | |
use Pimple\Container; | |
$container = new Container(); | |
$container['migration-table'] = 'migration'; |