-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d67d2c4
Showing
716 changed files
with
182,474 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,32 @@ | ||
APP_ENV=local | ||
APP_KEY= | ||
APP_DEBUG=true | ||
APP_LOG_LEVEL=debug | ||
APP_URL=http://localhost | ||
|
||
DB_CONNECTION=mysql | ||
DB_HOST=127.0.0.1 | ||
DB_PORT=3306 | ||
DB_DATABASE=homestead | ||
DB_USERNAME=homestead | ||
DB_PASSWORD=secret | ||
|
||
BROADCAST_DRIVER=log | ||
CACHE_DRIVER=file | ||
SESSION_DRIVER=file | ||
QUEUE_DRIVER=sync | ||
|
||
REDIS_HOST=127.0.0.1 | ||
REDIS_PASSWORD=null | ||
REDIS_PORT=6379 | ||
|
||
MAIL_DRIVER=smtp | ||
MAIL_HOST=mailtrap.io | ||
MAIL_PORT=2525 | ||
MAIL_USERNAME=null | ||
MAIL_PASSWORD=null | ||
MAIL_ENCRYPTION=null | ||
|
||
PUSHER_APP_ID= | ||
PUSHER_KEY= | ||
PUSHER_SECRET= |
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,3 @@ | ||
* text=auto | ||
*.css linguist-vendored | ||
*.scss linguist-vendored |
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,8 @@ | ||
/node_modules | ||
/public/storage | ||
/storage/*.key | ||
/vendor | ||
/.idea | ||
Homestead.json | ||
Homestead.yaml | ||
.env |
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,6 @@ | ||
Options +FollowSymLinks | ||
RewriteEngine On | ||
|
||
RewriteCond %{REQUEST_FILENAME} !-d | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteRule ^ index.php [L] |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,56 @@ | ||
<?php | ||
|
||
namespace App\Http; | ||
|
||
use Illuminate\Foundation\Http\Kernel as HttpKernel; | ||
|
||
class Kernel extends HttpKernel | ||
{ | ||
/** | ||
* The application's global HTTP middleware stack. | ||
* | ||
* These middleware are run during every request to your application. | ||
* | ||
* @var array | ||
*/ | ||
protected $middleware = [ | ||
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, | ||
]; | ||
|
||
/** | ||
* The application's route middleware groups. | ||
* | ||
* @var array | ||
*/ | ||
protected $middlewareGroups = [ | ||
'web' => [ | ||
\App\Http\Middleware\EncryptCookies::class, | ||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, | ||
\Illuminate\Session\Middleware\StartSession::class, | ||
\Illuminate\View\Middleware\ShareErrorsFromSession::class, | ||
// \App\Http\Middleware\VerifyCsrfToken::class, | ||
\Illuminate\Routing\Middleware\SubstituteBindings::class, | ||
], | ||
|
||
'api' => [ | ||
'throttle:60,1', | ||
'bindings', | ||
], | ||
]; | ||
|
||
/** | ||
* The application's route middleware. | ||
* | ||
* These middleware may be assigned to groups or used individually. | ||
* | ||
* @var array | ||
*/ | ||
protected $routeMiddleware = [ | ||
'auth' => \Illuminate\Auth\Middleware\Authenticate::class, | ||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, | ||
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, | ||
'can' => \Illuminate\Auth\Middleware\Authorize::class, | ||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, | ||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, | ||
]; | ||
} |
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,99 @@ | ||
<?php | ||
|
||
namespace App\Admin\Controllers; | ||
|
||
use App\Article; | ||
|
||
use Encore\Admin\Form; | ||
use Encore\Admin\Grid; | ||
use Encore\Admin\Facades\Admin; | ||
use Encore\Admin\Layout\Content; | ||
use App\Http\Controllers\Controller; | ||
use Encore\Admin\Controllers\ModelForm; | ||
|
||
class ArticleController extends Controller | ||
{ | ||
use ModelForm; | ||
|
||
/** | ||
* Index interface. | ||
* | ||
* @return Content | ||
*/ | ||
public function index() | ||
{ | ||
return Admin::content(function (Content $content) { | ||
|
||
$content->header('header'); | ||
$content->description('description'); | ||
|
||
$content->body($this->grid()); | ||
}); | ||
// return view('admin/article/index')->withArticles(Article::all()); | ||
} | ||
|
||
/** | ||
* Edit interface. | ||
* | ||
* @param $id | ||
* @return Content | ||
*/ | ||
public function edit($id) | ||
{ | ||
return Admin::content(function (Content $content) use ($id) { | ||
|
||
$content->header('header'); | ||
$content->description('description'); | ||
|
||
$content->body($this->form()->edit($id)); | ||
}); | ||
} | ||
|
||
/** | ||
* Create interface. | ||
* | ||
* @return Content | ||
*/ | ||
public function create() | ||
{ | ||
return Admin::content(function (Content $content) { | ||
|
||
$content->header('header'); | ||
$content->description('description'); | ||
|
||
$content->body($this->form()); | ||
}); | ||
} | ||
|
||
/** | ||
* Make a grid builder. | ||
* | ||
* @return Grid | ||
*/ | ||
protected function grid() | ||
{ | ||
return Admin::grid(Article::class, function (Grid $grid) { | ||
|
||
$grid->id('ID')->sortable(); | ||
|
||
$grid->created_at(); | ||
$grid->updated_at(); | ||
}); | ||
} | ||
|
||
/** | ||
* Make a form builder. | ||
* | ||
* @return Form | ||
*/ | ||
protected function form() | ||
{ | ||
return Admin::form(Article::class, function (Form $form) { | ||
|
||
$form->display('id', 'ID'); | ||
|
||
$form->display('created_at', 'Created At'); | ||
$form->display('updated_at', 'Updated At'); | ||
}); | ||
} | ||
} |
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,96 @@ | ||
<?php | ||
|
||
namespace App\Admin\Controllers; | ||
|
||
use Encore\Admin\Form; | ||
use Encore\Admin\Grid; | ||
use Encore\Admin\Facades\Admin; | ||
use Encore\Admin\Layout\Content; | ||
use App\Http\Controllers\Controller; | ||
use Encore\Admin\Controllers\ModelForm; | ||
|
||
class ExampleController extends Controller | ||
{ | ||
use ModelForm; | ||
|
||
/** | ||
* Index interface. | ||
* | ||
* @return Content | ||
*/ | ||
public function index() | ||
{ | ||
return Admin::content(function (Content $content) { | ||
|
||
$content->header('header'); | ||
$content->description('description'); | ||
|
||
$content->body($this->grid()); | ||
}); | ||
} | ||
|
||
/** | ||
* Edit interface. | ||
* | ||
* @param $id | ||
* @return Content | ||
*/ | ||
public function edit($id) | ||
{ | ||
return Admin::content(function (Content $content) use ($id) { | ||
|
||
$content->header('header'); | ||
$content->description('description'); | ||
|
||
$content->body($this->form()->edit($id)); | ||
}); | ||
} | ||
|
||
/** | ||
* Create interface. | ||
* | ||
* @return Content | ||
*/ | ||
public function create() | ||
{ | ||
return Admin::content(function (Content $content) { | ||
|
||
$content->header('header'); | ||
$content->description('description'); | ||
|
||
$content->body($this->form()); | ||
}); | ||
} | ||
|
||
/** | ||
* Make a grid builder. | ||
* | ||
* @return Grid | ||
*/ | ||
protected function grid() | ||
{ | ||
return Admin::grid(YourModel::class, function (Grid $grid) { | ||
|
||
$grid->id('ID')->sortable(); | ||
|
||
$grid->created_at(); | ||
$grid->updated_at(); | ||
}); | ||
} | ||
|
||
/** | ||
* Make a form builder. | ||
* | ||
* @return Form | ||
*/ | ||
protected function form() | ||
{ | ||
return Admin::form(YourModel::class, function (Form $form) { | ||
|
||
$form->display('id', 'ID'); | ||
|
||
$form->display('created_at', 'Created At'); | ||
$form->display('updated_at', 'Updated At'); | ||
}); | ||
} | ||
} |
Oops, something went wrong.