PHP code example of masterbroki / hookable
1. Go to this page and download the library: Download masterbroki/hookable library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
masterbroki / hookable example snippets
class MyModel extends \Illuminate\Database\Eloquent\Model{
use Sofa\Hookable\Hookable;
}
MyModel::hook('myMethod', function($myParams){
return "I want to select: " . implode(', ', $myParams);
});
$result = MyModel::select(["first", "second"]);
// $result will equal "I want to select: first, second"