Customized authentication will be used in this gist instead of default Auth facade provided by Laravel
composer create-project laravel-laravel your-project-name
cd your-project-name
| $lineItemsArray = array( | |
| "inputs" => [] | |
| ); | |
| $lineItemsArray["inputs"][] = array( | |
| "properties" => [ | |
| "name" => "1 year implementation consultation".$lineItem, | |
| "hs_recurring_billing_period" => null, | |
| "recurringbillingfrequency" => "monthly", | |
| "quantity" => "2", |
| - git tag v1.0.0 // Create Tag Locally | |
| - git push --tags // Push to remote | |
| - git tag -d v1.0.0 // Delete Tag Locally |
| # Create Services |
| // First Create a file in 'app/Services/Foobar.php' . | |
| // If Services folder not found, create one. | |
| <?php | |
| namespace App\Services; | |
| class Foo | |
| { | |
| private static $instance = null; |
| $users = User::query() | |
| ->addSelect(['last_login_at' => Login::select('created_at') | |
| ->whereColumn('user_id', 'users.id') // get the user_id from parent query users.id | |
| ->latest() | |
| ->take(1) // Get 1 record because sub query can return 1 column back | |
| ]) // Sample Sub Query | |
| ->withCasts(['last_login_at' => 'datetime']) | |
| ->orderBy('name') | |
| ->paginate() | |
| # cd to /storage/logs | |
| - Type | |
| - tail -f laravel.log |
| # In Laravel Model | |
| public static function boot() | |
| { | |
| parent::boot(); | |
| static::creating(function ($model) { | |
| // Code Here | |
| }); | |
| static::updating(function ($model) { | |
| // Code Here |
Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html