Fix formatting and interfaces in nearly every file
This commit is contained in:
31
resources/stubs/widgets/widget.stub
Normal file
31
resources/stubs/widgets/widget.stub
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace {{namespace}};
|
||||
|
||||
use App\Interfaces\Widget;
|
||||
|
||||
/**
|
||||
* Class {{class}}
|
||||
* @package {{namespace}}
|
||||
*/
|
||||
class {{class}} extends Widget
|
||||
{
|
||||
/**
|
||||
* The configuration array.
|
||||
*/
|
||||
protected $config = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Treat this method as a controller action.
|
||||
* Return view() or other content to display.
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
|
||||
return view('{{view}}', [
|
||||
'config' => $this->config,
|
||||
]);
|
||||
}
|
||||
}
|
||||
21
resources/stubs/widgets/widget_plain.stub
Normal file
21
resources/stubs/widgets/widget_plain.stub
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace {{namespace}};
|
||||
|
||||
use App\Interfaces\Widget;
|
||||
|
||||
/**
|
||||
* Class {{class}}
|
||||
* @package {{namespace}}
|
||||
*/
|
||||
class {{class}} extends Widget
|
||||
{
|
||||
/**
|
||||
* Treat this method as a controller action.
|
||||
* Return view() or other content to display.
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user