This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| App::missing(function() | |
| { | |
| if(Request::ajax()) | |
| { | |
| return Response::json([ | |
| 'code' => 404, | |
| 'message' => 'Sorry, that page does not exists.' | |
| ], 404); | |
| } | |
| return Response::view('404', [], 404); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php namespace Smile\Services\Creators; | |
| use Illuminate\Validation\Factory as Validator; | |
| abstract class Creator implements CreatorInterface | |
| { | |
| protected $model; | |
| protected $errors; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Illuminate\Database\Eloquent\ModelNotFoundException; | |
| class UsersController extends Controller | |
| { | |
| /** | |
| * Remove the specified resource from storage. | |
| * | |
| * @param int $id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php namespace Smile\Repositories; | |
| use App; | |
| class BaseRepository | |
| { | |
| protected $model; | |
| public function __construct() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Initial setup | |
| git clone -o framework -b develop https://github.com/laravel/laravel.git project-name | |
| cd project-name | |
| git checkout --orphan master | |
| git commit -m "Initial commit" | |
| # Pulling changes | |
| git fetch framework | |
| git merge --squash -m "Upgrade Laravel" framework/develop | |
| # Fix merge conflicts if any and commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Twitter extends Eloquent | |
| { | |
| protected $fillable = ['id_str', 'name', 'username', 'avatar']; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>404 Not Found</title> | |
| <style> | |
| @import url(//fonts.googleapis.com/css?family=Lato:700); | |
| body { | |
| margin:0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // translator | |
| function __($id, array $replace = array(), $locale = 'en') | |
| { | |
| return Lang::get('app.'.$id, $replace, $locale); | |
| } | |
| // file download | |
| function set_download_header($filename) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php namespace Pingpong\Traits; | |
| use Input, Redirect, Validator; | |
| trait ValidatorTrait | |
| { | |
| protected $validator; | |
| public function validate(array $input = null) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @if(Session::has('flash_message')) | |
| <div class="alert alert-{{ Session::get('flash_type', 'info') }} alert-dismissable"> | |
| <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> | |
| {{ Session::get('flash_message') }} | |
| </div> | |
| @endif |