Put SearchTrait.php in app directory. Then use SearchTrait in your model, like so
use App\SearchTrait;
use Illuminate\Database\Eloquent\Model;
class Article extends Model 
{| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <!-- Required meta tags --> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <link rel="stylesheet" href="../css/font-awesome.min.css" > | |
| <!-- Bootstrap CSS --> | |
| <link rel="stylesheet" href="../css/bootstrap.min.css" > | 
| <p class="lead"> | |
| <h1>Contact Page</h1> | |
| </p> | |
| #!/bin/bash | |
| # This program is free software: you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation, either version 3 of the License, or | |
| # (at your option) any later version. | |
| # | |
| # This program is distributed in the hope that it will be useful, | |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 
| # | |
| # validate_saudi_id() function for MySQL/MariaDB | |
| # This function will validate Saudi identity card number | |
| # | |
| # This program is free software: you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation, either version 3 of the License, or | |
| # (at your option) any later version. | |
| # | |
| # by Daif Alazmi (http://daif.net) | 
| # Function returns user.login, current year, the primary_key which is the id, in 5 length (Example: 00045) | |
| string format | |
| # http://developer.postgresql.org/pgdocs/postgres/functions-formatting.html | |
| # to_char(5,'00000') results the same number format | |
| CREATE OR REPLACE FUNCTION "public"."function_name" () RETURNS trigger AS | |
| ' | |
| BEGIN | |
| NEW.title = (SELECT login FROM users WHERE id = NEW.author) || to_char(NOW(),\'YYYY\') || lpad(NEW.id::char, 5, \'0\'); | |
| RETURN NEW; | |
| END | 
| Serial Keys: | |
| FU512-2DG1H-M85QZ-U7Z5T-PY8ZD | |
| CU3MA-2LG1N-48EGQ-9GNGZ-QG0UD | |
| GV7N2-DQZ00-4897Y-27ZNX-NV0TD | |
| YZ718-4REEQ-08DHQ-JNYQC-ZQRD0 | |
| GZ3N0-6CX0L-H80UP-FPM59-NKAD4 | |
| YY31H-6EYEJ-480VZ-VXXZC-QF2E0 | |
| ZG51K-25FE1-H81ZP-95XGT-WV2C0 | |
| VG30H-2AX11-H88FQ-CQXGZ-M6AY4 | 
| Configuration files to setup Wordpress with Apache2 webserver, Varnish caching server and HAproxy for loadbalancing with support for Lets Encrypt | 
| <?php | |
| namespace App\Http; | |
| use Illuminate\Foundation\Http\Kernel as HttpKernel; | |
| class Kernel extends HttpKernel | |
| { | |
| //---- |