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
{| <?php | |
| require 'vendor/autoload.php'; | |
| use GuzzleHttp\Client; | |
| $client = new Client([ | |
| 'base_uri' => 'http://example.com', | |
| ]); |
| package de.tdlabs.training.keycloak; | |
| import static java.util.Arrays.asList; | |
| import javax.ws.rs.core.Response; | |
| import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder; | |
| import org.keycloak.admin.client.Keycloak; | |
| import org.keycloak.admin.client.KeycloakBuilder; | |
| import org.keycloak.representations.idm.CredentialRepresentation; |
| # -*- coding: utf-8 -*- | |
| # based on this code | |
| # http://code.activestate.com/recipes/577423-convert-csv-to-xml/ | |
| # convert Odoo csv files in xml files | |
| # csv is easy to maintain but xml data have noupdate feature | |
| # Limitations: | |
| # - relation field One2many is NOT supported | |
| # - csv should have 'id' as first column |
| <odoo> | |
| <record model="report.paperformat" id="paperformat_attendance_recap_report"> | |
| <field name="name">paperformat.attendance.recap.report</field> | |
| <field name="default" eval="True"/> | |
| <field name="format">A4</field> | |
| <field name="page_width">0</field> | |
| <field name="page_width">0</field> | |
| <field name="orientation">Portrait</field> | |
| <field name="margin_top">30</field> | |
| <field name="margin_right">5</field> |
| [options] | |
| # | |
| # WARNING: | |
| # If you use the Odoo Database utility to change the master password be aware | |
| # that the formatting of this file WILL be LOST! A copy of this file named | |
| # /etc/odoo/openerp-server.conf.template has been made in case this happens | |
| # Note that the copy does not have any first boot changes | |
| #----------------------------------------------------------------------------- | |
| # Odoo Server Config File - TurnKey Linux |
| <?php | |
| header('Content-type: text/xml'); | |
| /* | |
| Runs from a directory containing files to provide an | |
| RSS 2.0 feed that contains the list and modification times for all the | |
| files. | |
| */ | |
| $feedName = "My Audio Feed"; | |
| $feedDesc = "Feed for the my audio files in some server folder"; |
| { | |
| "repositories": [ | |
| { | |
| "type": "path", | |
| "url": "../relative/project/path" | |
| } | |
| ], | |
| "require": { | |
| "${project}": "dev-${branch}" | |
| } |
| // Check Iranian National Code Validity - Clojure, C#, Ruby, JavaScript, Python, Scala, Java 8, PHP, C, Go, Swift, Kotlin, Groovy, Rust, Haskell, Erlang, Elixir | |
| // بررسی صحت کد ملی ایران - کلوژر، سیشارپ، روبی، جاوااسکریپت، پایتون، اسکالا، جاوا ۸، پیاچپی، سی، گو، سوئیفت، کاتلین، گرووی، راست، هسکل، ارلنگ، الکسیر | |
| // در نسخههای قبل یکسان بودن اعداد نا معتبر تشخیص داده میشد ولی | |
| // اعداد یکسان نامعتبر نیست http://www.fardanews.com/fa/news/127747 | |
| // بعضی از پیادهسازیها سریع نیستند، میتوانید نسخهٔ خود را بر پایهٔ | |
| // نسخهٔ سی یا گو ایجاد کنید که بهترین سرعت را داشته باشد | |
| /** |
| copy($(".checklist-item:not(.checklist-item-checked)").map(function() { | |
| var e = $(this), | |
| item = e.find(".checklist-item-details-text").text() | |
| if (e.hasClass("checklist-item-state-complete")) { | |
| item = item + " (DONE)" | |
| } | |
| return item | |
| }).get().join("\n")) |