phpvms/resources/stubs/widgets/widget.stub

32 lines
470 B
Plaintext
Raw Normal View History

<?php
namespace {{namespace}};
2019-08-02 21:02:23 +08:00
use App\Contracts\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,
]);
}
}