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 | |
| return array( | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Validation Language Lines | |
| |-------------------------------------------------------------------------- | |
| | | |
| | The following language lines contain the default error messages used by |
| server { | |
| listen 80; | |
| listen 8888; | |
| server_name localhost; | |
| index index.php index.html index.htm; | |
| root /path/to/root; | |
| autoindex on; |
Only files under 25 MB can be previewed with the Google Drive viewer.
Google Drive viewer helps you preview over 16 different file types, listed below:
Install Cygwin (http://www.cygwin.com/)
Download the RubyGems tarball from Ruby Forge (http://rubyforge.org/projects/rubygems/)
In a bash terminal, navigate to the unpacked directory and run:
| #!/bin/bash | |
| # Following the guide found at this page | |
| # http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html | |
| echo "\r\nUpdating system ...\r\n" | |
| sudo apt-get update | |
| # Create folder to place selenium in |
| require_once __DIR__ . "/vendor/autoload.php"; | |
| use \Facebook\WebDriver\Remote\WebDriverCapabilityType; | |
| use \Facebook\WebDriver\Remote\RemoteWebDriver; | |
| use \Facebook\WebDriver\WebDriverDimension; | |
| $host = '127.0.0.1:8910'; | |
| $capabilities = array( | |
| WebDriverCapabilityType::BROWSER_NAME => 'phantomjs', | |
| 'phantomjs.page.settings.userAgent' => 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0', |
| #! /bin/sh | |
| # Init. script for phantomjs, based on Ubuntu 12.04 skeleton. | |
| # Author: Anthony Lapenna <[email protected]> | |
| PATH=/sbin:/usr/sbin:/bin:/usr/bin | |
| DESC="Phantomjs service" | |
| NAME=phantomjs | |
| DAEMON=/usr/bin/$NAME | |
| PIDFILE=/var/run/$NAME.pid | |
| SCRIPTNAME=/etc/init.d/$NAME |
| [client] | |
| user = "mysql_user" | |
| password = "mysql_password" | |
| host = "localhost" |
| <!DOCTYPE html> | |
| <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| <style> | |
| body { | |
| background: repeat url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/7QCIUGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAGscAVoAAxslRxwCAAACAAAcAnQAV8KpIENoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbGQgLSBodHRwOi8vd3d3LnJlZGJ1YmJsZS5jb20vcGVvcGxlL0NoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlubwIQAABtbnRyUkdCIFhZWiAHzgACAAkABgAxAABhY3NwTVNGVAAAAABJRUMgc1JHQgAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLUhQICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFjcHJ0AAABUAAAADNkZXNjAAABhAAAAGx3dHB0AAAB8AAAABRia3B0AAACBAAAABRyWFlaAAACGAAAABRnWFlaAAACLAAAABRiWFlaAAACQAAAABRkbW5kAAACVAAAAHBkbWRkAAACxAAAAIh2dWVkAAADTAAAAIZ2aWV3AAAD1AAAACRsdW1pAAAD+AAAABRtZWFzAAAEDAAAACR0ZWNoAAAEMAAAAAxyVFJDAAAEPAAACAxnVFJDAAAEPAAACAxiVFJDAAAEPAAACAx0ZXh0AAAAAENvcHlyaWdodCAoYykgMTk5OCBIZXdsZXR0LVBhY2thcmQgQ29tcGFueQAAZGVzYwAAAAAAAAASc1JHQiBJRUM2MTk2Ni0yLjEAAAAAAAAAAAAAABJzUkdCIElFQzYxOTY2LTIuMQAAAAAAAA |