added view components support for modules
This commit is contained in:
28
app/Console/Stubs/Modules/component.stub
Normal file
28
app/Console/Stubs/Modules/component.stub
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace $NAMESPACE$;
|
||||
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class $CLASS$ extends Component
|
||||
{
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\View|string
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
return view('$ALIAS$::$VIEW_NAME$');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user