Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
langermank committed Feb 15, 2020
2 parents 188d8fd + dfa5b7f commit 5997812
Show file tree
Hide file tree
Showing 20 changed files with 442 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Stockwatch App

##Getting Started
## Getting Started



Expand Down
22 changes: 22 additions & 0 deletions app/Console/Commands/ModelMakeCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace tbirrell\LaravelModelDirectory\Console;

use Illuminate\Foundation\Console\ModelMakeCommand as BaseModelMakeCommand;

class ModelMakeCommand extends BaseModelMakeCommand
{
protected function getStub()
{
if ($this->option('pivot')) {
return __DIR__ . '../stubs/pivot.model.stub';
}

return __DIR__ . '../stubs/model.stub';
}

protected function getPath($name)
{
return parent::getPath("Models/$name");
}
}
16 changes: 16 additions & 0 deletions app/Console/stubs/model.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace DummyNamespace\Models;

class DummyClass extends BaseModel
{
//protected $table = '';
//protected $casts = [];

//=== RELATIONSHIPS ===//

//=== ATTRIBUTES ===//

//=== SCOPES ===//

}
10 changes: 10 additions & 0 deletions app/Console/stubs/pivot.model.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace DummyNamespace\Models;

use Illuminate\Database\Eloquent\Relations\Pivot;

class DummyClass extends Pivot
{
//
}
10 changes: 10 additions & 0 deletions app/Models/BaseModel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class BaseModel extends Model
{
//
}
8 changes: 8 additions & 0 deletions app/Models/Houseguest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace App\Models;

class Houseguest extends BaseModel
{
//
}
8 changes: 8 additions & 0 deletions app/Models/Role.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace App\Models;

class Role extends BaseModel
{
//
}
8 changes: 8 additions & 0 deletions app/Models/Season.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace App\Models;

class Season extends BaseModel
{
//
}
8 changes: 8 additions & 0 deletions app/Models/Stock.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace App\Models;

class Stock extends BaseModel
{
//
}
8 changes: 8 additions & 0 deletions app/Models/Transaction.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace App\Models;

class Transaction extends BaseModel
{
//
}
2 changes: 1 addition & 1 deletion app/User.php → app/Models/User.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App;
namespace App\Models;

use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
"php": "^7.2",
"fideloper/proxy": "^4.0",
"laravel/framework": "^6.2",
"laravel/tinker": "^2.0"
"laravel/tinker": "^2.0",
"tbirrell/laravel-model-directory": "dev-master"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.2",
"facade/ignition": "^1.4",
"fzaninotto/faker": "^1.9.1",
"laravel/ui": "^1.2",
Expand Down
171 changes: 169 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
'model' => App\Models\User::class,
],

// 'users' => [
Expand Down
33 changes: 33 additions & 0 deletions database/migrations/2020_02_15_203301_create_seasons_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSeasonsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('seasons', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('short_name');
$table->timestamps();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('seasons');
}
}
Loading

0 comments on commit 5997812

Please sign in to comment.