This file contains hidden or 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 namespace App; | |
enum AssociationEnum: int | |
{ | |
case CONTACT_TO_COMPANY = 1; | |
case DEAL_TO_CONTACT = 3; | |
case DEAL_TO_COMPANY = 5; | |
case QUOTE_TO_DEAL = 64; | |
case QUOTE_TO_QUOTE_TEMPLATE = 286; | |
case QUOTE_TO_LINE_ITEM = 67; |
This file contains hidden or 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
/** | |
Depends on StackFrame and ErrorStackParser ( https://github.com/stacktracejs/stacktrace.js ) | |
This custom Error function will bring a nice stacktrace to your logs. | |
It can also notify by email when not in preview mode ( optional ) | |
As this works with eval'd scripts, you can just package | |
the dependencies plus your script and use this generic piece in every script: | |
-- USAGE IN YOUR SCRIPT -- |
This file contains hidden or 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\Database\Query\Builder; | |
/** | |
* Trait MatchableTrait | |
* Author : Gael Debost | |
* Add a very basic match method to an Eloquent Model. Based on a SQL MATCH | |
* You need FULL TEXT Indexes in order to match fields. Somes rules : |