$searchable = [
'type',
'date',
];
$petsQuery = Pet::where('user_id', '=', $request->user()->id);
// OR: $petsQuery = Pet::query(). For empty query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"Insert namespace": { | |
"prefix": "name", | |
"body": ["namespace $1${TM_DIRECTORY/[\\/]/\\\\/g};", "$2"] | |
}, | |
"Construct": { | |
"prefix": "cons", | |
"body": ["${1:public} function __construct()", "{$2\n}$0"] | |
}, | |
"Class": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Foundation\Http\FormRequest; | |
use Illuminate\Validation\Rules\Unique; | |
class RegisterRequest extends FormRequest | |
{ | |
const NAME_MAX_LENGTH = 255; | |
const EMAIL_MAX_LENGTH = 255; | |
const PASSWORD_MIN_LENGTH = 8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Aws\Ses\SesClient; | |
use Illuminate\Mail\Markdown; | |
// Create SES client | |
$ses = new SesClient([ | |
'credentials' => [ | |
'key' => config('services.ses.key'), | |
'secret' => config('services.ses.secret'), | |
], |
A VPS is just a server machine (Ubuntu, CentOS,...) on the Internet which you can SSH into.
A local VPS is a VPS but running on your local machine thanks to Virtual Machine technology. It's very simple to create a VM thanks to Vagrant, so that you can use it to play with SSH, test deployment, test Ansible playbook,...
- Install VirtualBox
- Install Vagrant
- Create a virtual machine, for example: Ubuntu 20.04
If you are an Oh-my-zsh user, see the Laravel 5 plugin
For the rest of us Bash users, all of the Laravel Artisan autocomplete solutions out there require installing a composer package to get a list of artisan commands. Turns out this isn't really necessary. Simply add the provided code in ~/.bash_profile ( or similarly sourced file ) and you'll get artisan command tab completes on any project on your system.
_artisan()
{
local arg="${COMP_LINE#php }"
case "$arg" in
OlderNewer