re-add missing stub files
This commit is contained in:
parent
346ccfbd66
commit
a3ec21c73d
68
resources/stubs/modules/command.stub
Normal file
68
resources/stubs/modules/command.stub
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
|
|
||||||
|
class $CLASS$ extends Command
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The console command name.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $name = '$COMMAND_NAME$';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $description = 'Command description.';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new command instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the console command arguments.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
protected function getArguments()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
['example', InputArgument::REQUIRED, 'An example argument.'],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the console command options.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
protected function getOptions()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
26
resources/stubs/modules/composer.stub
Normal file
26
resources/stubs/modules/composer.stub
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"name": "$VENDOR$/$LOWER_NAME$",
|
||||||
|
"description": "",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "$AUTHOR_NAME$",
|
||||||
|
"email": "$AUTHOR_EMAIL$"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"$MODULE_NAMESPACE$\\$STUDLY_NAME$\\Providers\\$STUDLY_NAME$ServiceProvider",
|
||||||
|
"$MODULE_NAMESPACE$\\$STUDLY_NAME$\\Providers\\EventServiceProvider"
|
||||||
|
],
|
||||||
|
"aliases": {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"$MODULE_NAMESPACE$\\$STUDLY_NAME$\\": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
63
resources/stubs/modules/controller-admin.stub
Normal file
63
resources/stubs/modules/controller-admin.stub
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $MODULE_NAMESPACE$\$STUDLY_NAME$\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Http\Controllers\AppBaseController;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
|
||||||
|
class AdminController extends AppBaseController
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
return view('$LOWER_NAME$::admin.index');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
return view('$LOWER_NAME$::admin.create');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the specified resource.
|
||||||
|
*/
|
||||||
|
public function show()
|
||||||
|
{
|
||||||
|
return view('$LOWER_NAME$::admin.show');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*/
|
||||||
|
public function edit()
|
||||||
|
{
|
||||||
|
return view('$LOWER_NAME$::admin.edit');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*/
|
||||||
|
public function update(Request $request)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*/
|
||||||
|
public function destroy()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
9
resources/stubs/modules/controller-plain.stub
Normal file
9
resources/stubs/modules/controller-plain.stub
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $CLASS_NAMESPACE$;
|
||||||
|
|
||||||
|
use Illuminate\Routing\Controller;
|
||||||
|
|
||||||
|
class $CLASS$ extends Controller
|
||||||
|
{
|
||||||
|
}
|
64
resources/stubs/modules/controller.stub
Normal file
64
resources/stubs/modules/controller.stub
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $CLASS_NAMESPACE$;
|
||||||
|
|
||||||
|
use App\Http\Controllers\AppBaseController;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
|
||||||
|
class $CLASS$ extends AppBaseController
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
return view('$LOWER_NAME$::index');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
return view('$LOWER_NAME$::create');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
* @param Request $request
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the specified resource.
|
||||||
|
*/
|
||||||
|
public function show()
|
||||||
|
{
|
||||||
|
return view('$LOWER_NAME$::show');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*/
|
||||||
|
public function edit()
|
||||||
|
{
|
||||||
|
return view('$LOWER_NAME$::edit');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*/
|
||||||
|
public function update(Request $request)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*/
|
||||||
|
public function destroy()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
25
resources/stubs/modules/event-service-provider.stub
Normal file
25
resources/stubs/modules/event-service-provider.stub
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $MODULE_NAMESPACE$\$STUDLY_NAME$\Providers;
|
||||||
|
|
||||||
|
use App\Events\TestEvent;
|
||||||
|
use $MODULE_NAMESPACE$\$STUDLY_NAME$\Listeners\TestEventListener;
|
||||||
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
|
class EventServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The event listener mappings for the application.
|
||||||
|
*/
|
||||||
|
protected $listen = [
|
||||||
|
TestEvent::class => [TestEventListener::class],
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register any events for your application.
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
parent::boot();
|
||||||
|
}
|
||||||
|
}
|
30
resources/stubs/modules/event.stub
Normal file
30
resources/stubs/modules/event.stub
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
|
class $CLASS$
|
||||||
|
{
|
||||||
|
use SerializesModels;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new event instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the channels the event should be broadcast on.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function broadcastOn()
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
9
resources/stubs/modules/factory.stub
Normal file
9
resources/stubs/modules/factory.stub
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Faker\Generator as Faker;
|
||||||
|
|
||||||
|
$factory->define(Model::class, function (Faker $faker) {
|
||||||
|
return [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
});
|
34
resources/stubs/modules/job-queued.stub
Normal file
34
resources/stubs/modules/job-queued.stub
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
|
|
||||||
|
class $CLASS$ implements ShouldQueue
|
||||||
|
{
|
||||||
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new job instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the job.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
31
resources/stubs/modules/job.stub
Normal file
31
resources/stubs/modules/job.stub
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
|
|
||||||
|
class $CLASS$ implements ShouldQueue
|
||||||
|
{
|
||||||
|
use Dispatchable, Queueable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new job instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the job.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
15
resources/stubs/modules/json.stub
Normal file
15
resources/stubs/modules/json.stub
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"name": "$STUDLY_NAME$",
|
||||||
|
"alias": "$LOWER_NAME$",
|
||||||
|
"description": "",
|
||||||
|
"keywords": [],
|
||||||
|
"active": 1,
|
||||||
|
"order": 0,
|
||||||
|
"providers": [
|
||||||
|
"$MODULE_NAMESPACE$\\$STUDLY_NAME$\\Providers\\$STUDLY_NAME$ServiceProvider",
|
||||||
|
"$MODULE_NAMESPACE$\\$STUDLY_NAME$\\Providers\\EventServiceProvider"
|
||||||
|
],
|
||||||
|
"aliases": {},
|
||||||
|
"files": [],
|
||||||
|
"requires": []
|
||||||
|
}
|
30
resources/stubs/modules/listener-duck.stub
Normal file
30
resources/stubs/modules/listener-duck.stub
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
|
||||||
|
class $CLASS$
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create the event listener.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle the event.
|
||||||
|
*
|
||||||
|
* @param object $event
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function handle($event)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
32
resources/stubs/modules/listener-queued-duck.stub
Normal file
32
resources/stubs/modules/listener-queued-duck.stub
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
|
||||||
|
class $CLASS$ implements ShouldQueue
|
||||||
|
{
|
||||||
|
use InteractsWithQueue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create the event listener.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle the event.
|
||||||
|
*
|
||||||
|
* @param object $event
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function handle($event)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
33
resources/stubs/modules/listener-queued.stub
Normal file
33
resources/stubs/modules/listener-queued.stub
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use $EVENTNAME$;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
|
||||||
|
class $CLASS$ implements ShouldQueue
|
||||||
|
{
|
||||||
|
use InteractsWithQueue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create the event listener.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle the event.
|
||||||
|
*
|
||||||
|
* @param $SHORTEVENTNAME$ $event
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function handle($SHORTEVENTNAME$ $event)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
16
resources/stubs/modules/listener-test.stub
Normal file
16
resources/stubs/modules/listener-test.stub
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $MODULE_NAMESPACE$\$STUDLY_NAME$\Listeners;
|
||||||
|
|
||||||
|
use App\Events\TestEvent;
|
||||||
|
use Log;
|
||||||
|
|
||||||
|
class TestEventListener
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle the event.
|
||||||
|
*/
|
||||||
|
public function handle(TestEvent $event) {
|
||||||
|
Log::info('Received event', [$event]);
|
||||||
|
}
|
||||||
|
}
|
31
resources/stubs/modules/listener.stub
Normal file
31
resources/stubs/modules/listener.stub
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use $EVENTNAME$;
|
||||||
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
|
||||||
|
class $CLASS$
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create the event listener.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle the event.
|
||||||
|
*
|
||||||
|
* @param $SHORTEVENTNAME$ $event
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function handle($SHORTEVENTNAME$ $event)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
33
resources/stubs/modules/mail.stub
Normal file
33
resources/stubs/modules/mail.stub
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Mail\Mailable;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
|
||||||
|
class $CLASS$ extends Mailable
|
||||||
|
{
|
||||||
|
use Queueable, SerializesModels;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new message instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build the message.
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function build()
|
||||||
|
{
|
||||||
|
return $this->view('view.name');
|
||||||
|
}
|
||||||
|
}
|
21
resources/stubs/modules/middleware.stub
Normal file
21
resources/stubs/modules/middleware.stub
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class $CLASS$
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle an incoming request.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param \Closure $next
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle(Request $request, Closure $next)
|
||||||
|
{
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
|
}
|
32
resources/stubs/modules/migration/add.stub
Normal file
32
resources/stubs/modules/migration/add.stub
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class $CLASS$ extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('$TABLE$', function (Blueprint $table) {
|
||||||
|
$FIELDS_UP$
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('$TABLE$', function (Blueprint $table) {
|
||||||
|
$FIELDS_DOWN$
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
32
resources/stubs/modules/migration/create.stub
Normal file
32
resources/stubs/modules/migration/create.stub
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class $CLASS$ extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('$TABLE$', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$FIELDS$
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('$TABLE$');
|
||||||
|
}
|
||||||
|
}
|
32
resources/stubs/modules/migration/delete.stub
Normal file
32
resources/stubs/modules/migration/delete.stub
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class $CLASS$ extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('$TABLE$', function (Blueprint $table) {
|
||||||
|
$FIELDS_UP$
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('$TABLE$', function (Blueprint $table) {
|
||||||
|
$FIELDS_DOWN$
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
32
resources/stubs/modules/migration/drop.stub
Normal file
32
resources/stubs/modules/migration/drop.stub
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class $CLASS$ extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('$TABLE$');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::create('$TABLE$', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$FIELDS$
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
28
resources/stubs/modules/migration/plain.stub
Normal file
28
resources/stubs/modules/migration/plain.stub
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class $CLASS$ extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
10
resources/stubs/modules/model.stub
Normal file
10
resources/stubs/modules/model.stub
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class $CLASS$ extends Model
|
||||||
|
{
|
||||||
|
protected $fillable = $FILLABLE$;
|
||||||
|
}
|
61
resources/stubs/modules/notification.stub
Normal file
61
resources/stubs/modules/notification.stub
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Notifications\Notification;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
use Illuminate\Notifications\Messages\MailMessage;
|
||||||
|
|
||||||
|
class $CLASS$ extends Notification
|
||||||
|
{
|
||||||
|
use Queueable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new notification instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the notification's delivery channels.
|
||||||
|
*
|
||||||
|
* @param mixed $notifiable
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function via($notifiable)
|
||||||
|
{
|
||||||
|
return ['mail'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the mail representation of the notification.
|
||||||
|
*
|
||||||
|
* @param mixed $notifiable
|
||||||
|
* @return \Illuminate\Notifications\Messages\MailMessage
|
||||||
|
*/
|
||||||
|
public function toMail($notifiable)
|
||||||
|
{
|
||||||
|
return (new MailMessage)
|
||||||
|
->line('The introduction to the notification.')
|
||||||
|
->action('Notification Action', 'https://laravel.com')
|
||||||
|
->line('Thank you for using our application!');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the array representation of the notification.
|
||||||
|
*
|
||||||
|
* @param mixed $notifiable
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function toArray($notifiable)
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
20
resources/stubs/modules/policy.plain.stub
Normal file
20
resources/stubs/modules/policy.plain.stub
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||||
|
|
||||||
|
class $CLASS$
|
||||||
|
{
|
||||||
|
use HandlesAuthorization;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new policy instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
35
resources/stubs/modules/provider.stub
Normal file
35
resources/stubs/modules/provider.stub
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
|
class $CLASS$ extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Indicates if loading of the provider is deferred.
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
protected $defer = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register the service provider.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function register()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the services provided by the provider.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function provides()
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
30
resources/stubs/modules/request.stub
Normal file
30
resources/stubs/modules/request.stub
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
class $CLASS$ extends FormRequest
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Get the validation rules that apply to the request.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function rules()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine if the user is authorized to make this request.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function authorize()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
19
resources/stubs/modules/resource-collection.stub
Normal file
19
resources/stubs/modules/resource-collection.stub
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||||
|
|
||||||
|
class $CLASS$ extends ResourceCollection
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Transform the resource collection into an array.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function toArray($request)
|
||||||
|
{
|
||||||
|
return parent::toArray($request);
|
||||||
|
}
|
||||||
|
}
|
19
resources/stubs/modules/resource.stub
Normal file
19
resources/stubs/modules/resource.stub
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use Illuminate\Http\Resources\Json\Resource;
|
||||||
|
|
||||||
|
class $CLASS$ extends Resource
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Transform the resource into an array.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function toArray($request)
|
||||||
|
{
|
||||||
|
return parent::toArray($request);
|
||||||
|
}
|
||||||
|
}
|
41
resources/stubs/modules/route-provider.stub
Normal file
41
resources/stubs/modules/route-provider.stub
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use Illuminate\Routing\Router;
|
||||||
|
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
|
class $CLASS$ extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The root namespace to assume when generating URLs to actions.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $rootUrlNamespace = '$MODULE_NAMESPACE$\$MODULE$\Http\Controllers';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called before routes are registered.
|
||||||
|
*
|
||||||
|
* Register any model bindings or pattern based filters.
|
||||||
|
*
|
||||||
|
* @param Router $router
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function before(Router $router)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the routes for the application.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function map(Router $router)
|
||||||
|
{
|
||||||
|
// if (!app()->routesAreCached()) {
|
||||||
|
// require __DIR__ . '$ROUTES_PATH$';
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
18
resources/stubs/modules/routes.stub
Normal file
18
resources/stubs/modules/routes.stub
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
Route::group(['middleware' => [
|
||||||
|
'role:admin|user' # leave blank to make this public
|
||||||
|
]], function() {
|
||||||
|
|
||||||
|
# all your routes are prefixed with the above prefix
|
||||||
|
# e.g. yoursite.com/sample
|
||||||
|
Route::get('/', '$STUDLY_NAME$Controller@index');
|
||||||
|
|
||||||
|
# This is the admin path. Comment this out if you don't have
|
||||||
|
# an admin panel component.
|
||||||
|
Route::group([
|
||||||
|
'middleware' => ['role:admin'],
|
||||||
|
], function () {
|
||||||
|
Route::get('/admin', 'AdminController@index');
|
||||||
|
});
|
||||||
|
});
|
40
resources/stubs/modules/rule.stub
Normal file
40
resources/stubs/modules/rule.stub
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use Illuminate\Contracts\Validation\Rule;
|
||||||
|
|
||||||
|
class $CLASS$ implements Rule
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create a new rule instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine if the validation rule passes.
|
||||||
|
*
|
||||||
|
* @param string $attribute
|
||||||
|
* @param mixed $value
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function passes($attribute, $value)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the validation error message.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function message()
|
||||||
|
{
|
||||||
|
return 'The validation error message.';
|
||||||
|
}
|
||||||
|
}
|
5
resources/stubs/modules/scaffold/config.stub
Normal file
5
resources/stubs/modules/scaffold/config.stub
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'name' => '$STUDLY_NAME$'
|
||||||
|
];
|
132
resources/stubs/modules/scaffold/provider.stub
Normal file
132
resources/stubs/modules/scaffold/provider.stub
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
use Illuminate\Database\Eloquent\Factory;
|
||||||
|
use Route;
|
||||||
|
|
||||||
|
|
||||||
|
class $CLASS$ extends ServiceProvider
|
||||||
|
{
|
||||||
|
protected $defer = false;
|
||||||
|
protected $moduleSvc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Boot the application events.
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
$this->moduleSvc = app('App\Services\ModuleService');
|
||||||
|
|
||||||
|
$this->registerRoutes();
|
||||||
|
$this->registerTranslations();
|
||||||
|
$this->registerConfig();
|
||||||
|
$this->registerViews();
|
||||||
|
|
||||||
|
$this->registerLinks();
|
||||||
|
|
||||||
|
$this->registerFactories();
|
||||||
|
$this->loadMigrationsFrom(__DIR__ . '/../$MIGRATIONS_PATH$');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register the service provider.
|
||||||
|
*/
|
||||||
|
public function register()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add module links here
|
||||||
|
*/
|
||||||
|
public function registerLinks()
|
||||||
|
{
|
||||||
|
// Show this link if logged in
|
||||||
|
// $this->moduleSvc->addFrontendLink('$STUDLY_NAME$', '/$LOWER_NAME$', '', $logged_in=true);
|
||||||
|
|
||||||
|
// Admin links:
|
||||||
|
$this->moduleSvc->addAdminLink('$STUDLY_NAME$', '/$LOWER_NAME$/admin');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register the routes
|
||||||
|
*/
|
||||||
|
protected function registerRoutes()
|
||||||
|
{
|
||||||
|
Route::group([
|
||||||
|
'as' => '$LOWER_NAME$.',
|
||||||
|
'prefix' => '$LOWER_NAME$',
|
||||||
|
// If you want a RESTful module, change this to 'api'
|
||||||
|
'middleware' => ['web'],
|
||||||
|
'namespace' => '$MODULE_NAMESPACE$\$STUDLY_NAME$\Http\Controllers'
|
||||||
|
], function() {
|
||||||
|
$this->loadRoutesFrom(__DIR__ . '/../Http/routes.php');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register config.
|
||||||
|
*/
|
||||||
|
protected function registerConfig()
|
||||||
|
{
|
||||||
|
$this->publishes([
|
||||||
|
__DIR__.'/../$PATH_CONFIG$/config.php' => config_path('$LOWER_NAME$.php'),
|
||||||
|
], 'config');
|
||||||
|
|
||||||
|
$this->mergeConfigFrom(
|
||||||
|
__DIR__.'/../$PATH_CONFIG$/config.php', '$LOWER_NAME$'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register views.
|
||||||
|
*/
|
||||||
|
public function registerViews()
|
||||||
|
{
|
||||||
|
$viewPath = resource_path('views/modules/$LOWER_NAME$');
|
||||||
|
$sourcePath = __DIR__.'/../$PATH_VIEWS$';
|
||||||
|
|
||||||
|
$this->publishes([
|
||||||
|
$sourcePath => $viewPath
|
||||||
|
],'views');
|
||||||
|
|
||||||
|
$this->loadViewsFrom(array_merge(array_map(function ($path) {
|
||||||
|
return $path . '/modules/$LOWER_NAME$';
|
||||||
|
}, \Config::get('view.paths')), [$sourcePath]), '$LOWER_NAME$');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register translations.
|
||||||
|
*/
|
||||||
|
public function registerTranslations()
|
||||||
|
{
|
||||||
|
$langPath = resource_path('lang/modules/$LOWER_NAME$');
|
||||||
|
|
||||||
|
if (is_dir($langPath)) {
|
||||||
|
$this->loadTranslationsFrom($langPath, '$LOWER_NAME$');
|
||||||
|
} else {
|
||||||
|
$this->loadTranslationsFrom(__DIR__ .'/../$PATH_LANG$', '$LOWER_NAME$');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register an additional directory of factories.
|
||||||
|
* @source https://github.com/sebastiaanluca/laravel-resource-flow/blob/develop/src/Modules/ModuleServiceProvider.php#L66
|
||||||
|
*/
|
||||||
|
public function registerFactories()
|
||||||
|
{
|
||||||
|
if (! app()->environment('production')) {
|
||||||
|
app(Factory::class)->load(__DIR__ . '/../$FACTORIES_PATH$');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the services provided by the provider.
|
||||||
|
*/
|
||||||
|
public function provides()
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
21
resources/stubs/modules/seeder.stub
Normal file
21
resources/stubs/modules/seeder.stub
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$\Database\Seeders;
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class $NAME$ extends Seeder
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the database seeds.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
Model::unguard();
|
||||||
|
|
||||||
|
// $this->call("OthersTableSeeder");
|
||||||
|
}
|
||||||
|
}
|
17
resources/stubs/modules/start.stub
Normal file
17
resources/stubs/modules/start.stub
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register Namespaces And Routes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When a module starting, this file will executed automatically. This helps
|
||||||
|
| to register some namespaces like translator or view. Also this file
|
||||||
|
| will load the routes file for each module. You may also modify
|
||||||
|
| this file as you want.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*if (!app()->routesAreCached()) {
|
||||||
|
require __DIR__ . '$ROUTES_LOCATION$';
|
||||||
|
}*/
|
19
resources/stubs/modules/unit-test.stub
Normal file
19
resources/stubs/modules/unit-test.stub
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace $NAMESPACE$;
|
||||||
|
|
||||||
|
use Tests\TestCase;
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
|
||||||
|
class $CLASS$ extends TestCase
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* A basic test example.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function testExample()
|
||||||
|
{
|
||||||
|
$this->assertTrue(true);
|
||||||
|
}
|
||||||
|
}
|
5
resources/stubs/modules/views/admin.stub
Normal file
5
resources/stubs/modules/views/admin.stub
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{{--
|
||||||
|
You probably don't want to edit anything here. Just make
|
||||||
|
sure to extend this in your views. It will pass the content section through
|
||||||
|
--}}
|
||||||
|
@extends('admin.app')
|
5
resources/stubs/modules/views/frontend.stub
Normal file
5
resources/stubs/modules/views/frontend.stub
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{{--
|
||||||
|
You probably don't want to edit anything here. Just make
|
||||||
|
sure to extend this in your views. It will pass the content section through
|
||||||
|
--}}
|
||||||
|
@extends('layouts.' . config('phpvms.skin') . '.app')
|
18
resources/stubs/modules/views/index-admin.stub
Normal file
18
resources/stubs/modules/views/index-admin.stub
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
@extends('$LOWER_NAME$::layouts.admin')
|
||||||
|
|
||||||
|
@section('title', '$STUDLY_NAME$')
|
||||||
|
@section('actions')
|
||||||
|
<li>
|
||||||
|
<a href="{!! url('/$LOWER_NAME$/admin/create') !!}">
|
||||||
|
<i class="ti-plus"></i>
|
||||||
|
Add New</a>
|
||||||
|
</li>
|
||||||
|
@endsection
|
||||||
|
@section('content')
|
||||||
|
<div class="card border-blue-bottom">
|
||||||
|
<div class="header"><h4 class="title">Admin Scaffold!</h4></div>
|
||||||
|
<div class="content">
|
||||||
|
<p>This view is loaded from module: {!! config('$LOWER_NAME$.name') !!}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
9
resources/stubs/modules/views/index.stub
Normal file
9
resources/stubs/modules/views/index.stub
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
@extends('$LOWER_NAME$::layouts.frontend')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<h1>Hello World</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
This view is loaded from module: {!! config('$LOWER_NAME$.name') !!}
|
||||||
|
</p>
|
||||||
|
@endsection
|
Loading…
Reference in New Issue
Block a user