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 {| cat <<EOF >> /etc/apt/sources.list | |
| deb http://archive.ubuntu.com/ubuntu precise main restricted universe | |
| deb http://archive.ubuntu.com/ubuntu precise-updates main restricted universe | |
| deb http://security.ubuntu.com/ubuntu precise-security main restricted universe multiverse | |
| EOF | |
| apt-get update | |
| apt-get purge \ | |
| apache2 \ |
I freaking love working with technologies like Grunt and Gulp, and wanted to share how to get my current EE front-end workflow set up. With a few tweaks, this can also be used with virtually any other sites (I've used it with Laravel, static sites, Craft, etc).
| <?php namespace Smile\Services\Creators; | |
| use Illuminate\Validation\Factory as Validator; | |
| abstract class Creator implements CreatorInterface | |
| { | |
| protected $model; | |
| protected $errors; |
Direktori L3. Saya berasumsi anda telah menginstall composer. Bisa dalam bentuk bin atau hasil download dari http://getcomposer.org/composer.phar.
Saya kasih contoh dengan menggunakan composer.phar dan letakkan file tersebut seperti ini.
/application
/bundles
/laravel
/public
/storage
| <?php | |
| // Resizer and Image Manipulation | |
| // Based on: http://forums.laravel.com/viewtopic.php?id=2648 | |
| public function post_edit_logo($id) | |
| { | |
| $rules = array( | |
| 'image' => 'image', | |
| ); |
| $(document).ready(function() { | |
| // Support for AJAX loaded modal window. | |
| // Focuses on first input textbox after it loads the window. | |
| $('[data-toggle="modal"]').click(function(e) { | |
| e.preventDefault(); | |
| var url = $(this).attr('href'); | |
| if (url.indexOf('#') == 0) { | |
| $(url).modal('open'); | |
| } else { |