I have a component RemoveBook in app/View/Components/RemoveBook and the blade component in resources/views/components/sections/parts/remove-book.blade.php.
all working fine on localhost
but on the server – Cpanel – not rendering
component code
public $route;
public $bookid;
/**
* Create a new component instance.
*
* @return void
*/
public function __construct($route, $bookid)
{
$this->route = $route;
$this->bookid = $bookid;
}
/**
* Get the view / contents that represent the component.
*
* @return IlluminateContractsViewView|Closure|string
*/
public function render()
{
$this->route = Request::is('myBook*') ? 'myBook.destroy' : 'wishList.destroy';
return view('components.sections.parts.remove-book');
}
in view
{!! Form::open(['route' => [$route, $bookid], 'method' => 'delete']) !!}
<div class="absolute top-0 right-0">
<button class="w-35-px h-35-px bg-brand-black text-white border hover:opacity-100">
X
</button>
</div>
{!! Form::close() !!}
and more than 5 components not rendering on the server – all components – but on localhost all working fine
3
Answers
Try
then
then
then
just Try
Rename component class name, it must start with uppercase letter.