From 9931e0888b2419326ae10ebbfae532261c5c125f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 30 Jun 2016 16:11:56 +0200 Subject: Fix submodules --- vim/bundle/vim-snippets | 1 + .../vim-snippets/UltiSnips/php-laravel.snippets | 270 --------------------- 2 files changed, 1 insertion(+), 270 deletions(-) create mode 160000 vim/bundle/vim-snippets delete mode 100644 vim/bundle/vim-snippets/UltiSnips/php-laravel.snippets (limited to 'vim/bundle/vim-snippets/UltiSnips/php-laravel.snippets') diff --git a/vim/bundle/vim-snippets b/vim/bundle/vim-snippets new file mode 160000 index 0000000..15d7e5e --- /dev/null +++ b/vim/bundle/vim-snippets @@ -0,0 +1 @@ +Subproject commit 15d7e5ec26ec93adee4051b6359be90a943aa38d diff --git a/vim/bundle/vim-snippets/UltiSnips/php-laravel.snippets b/vim/bundle/vim-snippets/UltiSnips/php-laravel.snippets deleted file mode 100644 index 7367a14..0000000 --- a/vim/bundle/vim-snippets/UltiSnips/php-laravel.snippets +++ /dev/null @@ -1,270 +0,0 @@ -#resource controller -snippet l_rsc "Laravel resource controller" b -/*! - * \class $1 - * - * \author ${3:`!v g:snips_author`} - * \date `!v strftime('%d-%m-%y')` - */ - -class ${1:`!v expand('%:t:r')`} extends ${2:BaseController} { - function __construct() { - } - - public function index() { - } - - public function create() { - } - - public function store() { - } - - public function show($id) { - } - - public function edit($id) { - } - - public function update($id) { - } - - public function destroy($id) { - } -} -endsnippet - -#service service provider -snippet l_ssp "Laravel service provider for service" b -app->bind('${4}Service', function ($app) { - return new ${5}( - $app->make('Repositories\\${6}Interface') - ); - }); - } -} -endsnippet - -#repository service provider -snippet l_rsp "Laravel service provider for repository" b -app->bind('$2\\$1Interface', function($app) { - return new $1Repository(new $1()); - }); - } - - /*! - * \brief If $defer == true need this fn - */ - public function provides() { - return ['$2\\$1Interface']; - } -} -endsnippet - -#model -snippet l_md "Laravel simple model" b -model = $model; - } - - /*! - * \fn all - * - * \return Illuminate\Database\Eloquent\Collection - */ - public function all($columns = array('*')) { - return $this->model->all()->toArray(); - } - - /*! - * \fn create - * - * \return Illuminate\Database\Eloquent\Model - */ - public function create(array $attributes) { - return $this->model->create($attributes); - } - - /*! - * \fn destroy - * - * \return int - */ - public function destroy($ids) { - return $this->model->destroy($ids); - } - - /*! - * \fn find - * - * \return mixed - */ - public function find($id, $columns = array('*')) { - return $this->model->find($id, $columns); - } -} -endsnippet - -#repository -snippet l_r "Laravel Repository" b -$5 = $repo; - } -} -endsnippet - -#facade -snippet l_f "Laravel Facade" b -