-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add MVC structure * add migration
- Loading branch information
Showing
4 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
/** | ||
* Copyright (c) 2018. JoomPlace, all rights reserved | ||
*/ | ||
|
||
namespace Joomplace\Component\Roadmap\Admin\Controller; | ||
|
||
|
||
use Joomplace\X\Controller; | ||
use Joomplace\X\Helper\Restful; | ||
|
||
class Idea extends Controller | ||
{ | ||
use Restful; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/** | ||
* Copyright (c) 2018. JoomPlace, all rights reserved | ||
*/ | ||
|
||
namespace Joomplace\Component\Roadmap\Admin\Model; | ||
|
||
|
||
use Joomplace\X\Model; | ||
|
||
class Idea extends Model | ||
{ | ||
protected $fillable = ['title', 'description', 'project_id']; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
/** | ||
* Copyright (c) 2018. JoomPlace, all rights reserved | ||
*/ | ||
|
||
use Illuminate\Database\Capsule\Manager as DB; | ||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
|
||
class CreateIdeasTable extends Migration | ||
{ | ||
public function up() | ||
{ | ||
$model = new \Joomplace\Component\Roadmap\Admin\Model\Idea(); | ||
DB::schema()->create($model->getTable(), function (Blueprint $table) { | ||
$table->increments('id'); | ||
$table->string('title'); | ||
$table->string('description'); | ||
$table->integer('project_id', false, true)->comment('id of the related project'); | ||
$table->timestamps(); | ||
}); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
/** | ||
* Copyright (c) 2018. JoomPlace, all rights reserved | ||
*/ | ||
|
||
namespace Joomplace\Component\Roadmap\Admin\view\Idea; | ||
|
||
|
||
use Joomplace\X\Renderer\Edge; | ||
use Joomplace\X\View; | ||
|
||
class Html extends View | ||
{ | ||
use Edge; | ||
} |