Having the Schema Ready would be great place to start!
Dog
- id
- name
{ | |
} |
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
// truncate('this is a test is a bunch of text now do some truncating') | |
// truncate('this is a test is a bunch of text now do some truncating', 50, '', '') | |
// truncate('this is a test is a bunch of text now do some truncating', 50, '', '...') | |
// truncate('this is a test is a bunch of text now do some truncating', 50, ' ', '...') | |
const truncate = (string, limit = 50, breakChar = ' ', rightPad = '...') => { | |
if (string.length <= limit) return string; | |
const breakPoint = string.substr(0, limit).lastIndexOf(breakChar); | |
if (breakPoint >= 0 && breakPoint < string.length - 1) { | |
return string.substr(0, breakPoint) + rightPad; |
#!/bin/bash | |
production_path='/root/crg' | |
env=$(if [ pwd = production_path ]; then echo "prod"; else echo "local"; fi) | |
# check if .env set | |
if [ ! -f ".env" ]; then | |
cp .env.example .env | |
echo '.env Added ' | |
php artisan key:generate |
[2024-09-23 18:32:50] local.INFO: array ( 0 => '01h3fvreef1xygk976wp9zvms1', 1 => 'The Eye Institute of Utah',', ) [2024-09-23 18:32:53] local.INFO: array ( 0 => 'Overall', 1 => array ( 'index' => 100, 'industry' => 77.0,
<?php | |
use Carbon\Carbon; | |
use FacebookAds\Api; | |
use Illuminate\Support\Facades\Route; | |
Route::get('debug', function () { | |
Api::init(env('FB_APP_ID'), env('FB_APP_SECRET'), env('FB_ACCESS_TOKEN')); | |
$api = Api::instance(); |
Understanding the Core Patterns of Blueprint | |
Blueprint allows you to define your Laravel application's components—like models and controllers—in a concise, human-readable YAML syntax. The key is to recognize the consistent patterns in how these definitions are structured. | |
Let's focus on simplifying models and controllers, as they are foundational to any Laravel application. | |
## Models | |
At its simplest, a model in Blueprint is defined by: | |
- **Model Name**: The singular, capitalized name of the model. | |
- **Fields**: Key-value pairs where the key is the field name, and the value is the data type (with optional modifiers). |
module.exports = { | |
'root': true, | |
'env': { | |
'browser': true, | |
'node': true, | |
'es2021': true | |
}, | |
'extends': [ | |
'eslint:recommended', | |
'plugin:vue/vue3-essential' |