Skip to content

Commit

Permalink
Remove contract
Browse files Browse the repository at this point in the history
  • Loading branch information
hariadi committed Jun 1, 2017
1 parent 5ed6862 commit 9883f65
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/Commands/AppRepositoryCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ protected function getStub()
*/
public function handle()
{
if (parent::handle() !== false) {
$this->call('app:contract', ['name' => $this->argument('name')]);
}
parent::handle();
}

/**
Expand Down
14 changes: 13 additions & 1 deletion src/Commands/stubs/repository.stub
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,22 @@
namespace {{namespace}};

use App\Models\{{model}}\{{model}};
use Illuminate\Support\Facades\DB;
use App\Repositories\BaseRepository;
use App\Exceptions\GeneralException;
use Illuminate\Database\Eloquent\Model;

class {{class}} implements {{model}}RepositoryContract
class {{class}} extends BaseRepository
{
/**
* Associated Repository Model.
*/
const MODEL = {{model}}::class;

/**
* @return mixed
*/
public function getForDataTable() {}

{{all}} /**
* Get all instance of {{model}}.
Expand Down

0 comments on commit 9883f65

Please sign in to comment.