namespace App\MoonShine\Controllers;
use MoonShine\Contracts\Core\PageContract;
use MoonShine\Laravel\Http\Controllers\MoonShineController;
final class CustomViewController extends MoonShineController
{
public function __invoke(): PageContract
{
return $this->view(
'path_to_blade',
['param' => 'value']
);
}
}
namespace App\MoonShine\Controllers;
use MoonShine\Contracts\Core\PageContract;
use MoonShine\Laravel\Http\Controllers\MoonShineController;
final class CustomViewController extends MoonShineController
{
public function __invoke(): PageContract
{
return $this->view(
'path_to_blade',
['param' => 'value']
);
}
}
namespace App\MoonShine\Controllers;
use App\MoonShine\Pages\MyPage;
use MoonShine\Laravel\Http\Controllers\MoonShineController;
final class CustomViewController extends MoonShineController
{
public function __invoke(MyPage $page): MyPage
{
return $page->loaded();
}
}
namespace App\MoonShine\Controllers;
use App\MoonShine\Pages\MyPage;
use MoonShine\Laravel\Http\Controllers\MoonShineController;
final class CustomViewController extends MoonShineController
{
public function __invoke(MyPage $page): MyPage
{
return $page->loaded();
}
}
namespace App\MoonShine\Controllers;
use MoonShine\Laravel\Http\Controllers\MoonShineController;
use MoonShine\Support\Enums\ToastType;
use Symfony\Component\HttpFoundation\Response;
final class CustomViewController extends MoonShineController
{
public function __invoke(): Response
{
$this->toast('Hello world', ToastType::SUCCESS);
return back();
}
}
namespace App\MoonShine\Controllers;
use MoonShine\Laravel\Http\Controllers\MoonShineController;
use MoonShine\Support\Enums\ToastType;
use Symfony\Component\HttpFoundation\Response;
final class CustomViewController extends MoonShineController
{
public function __invoke(): Response
{
$this->toast('Hello world', ToastType::SUCCESS);
return back();
}
}
namespace App\MoonShine\Controllers;
use MoonShine\Laravel\Http\Controllers\MoonShineController;
use Symfony\Component\HttpFoundation\Response;
final class CustomViewController extends MoonShineController
{
public function __invoke(): Response
{
$this->notification('Message');
return back();
}
}
namespace App\MoonShine\Controllers;
use MoonShine\Laravel\Http\Controllers\MoonShineController;
use Symfony\Component\HttpFoundation\Response;
final class CustomViewController extends MoonShineController
{
public function __invoke(): Response
{
$this->notification('Message');
return back();
}
}
namespace App\MoonShine\Controllers;
use MoonShine\Laravel\MoonShineRequest;
use MoonShine\Laravel\Http\Controllers\MoonShineController;
use Symfony\Component\HttpFoundation\Response;
final class CustomViewController extends MoonShineController
{
public function __invoke(MoonShineRequest $request)
{
// $request->getPage();
// $request->getResource();
}
}
namespace App\MoonShine\Controllers;
use MoonShine\Laravel\MoonShineRequest;
use MoonShine\Laravel\Http\Controllers\MoonShineController;
use Symfony\Component\HttpFoundation\Response;
final class CustomViewController extends MoonShineController
{
public function __invoke(MoonShineRequest $request)
{
// $request->getPage();
// $request->getResource();
}
}
namespace App\MoonShine\Controllers;
use MoonShine\Laravel\Http\Controllers\MoonShineController;
use Symfony\Component\HttpFoundation\Response;
final class CustomViewController extends MoonShineController
{
public function __invoke(): Response
{
return $this->json(message: 'Message', data: []);
}
}
namespace App\MoonShine\Controllers;
use MoonShine\Laravel\Http\Controllers\MoonShineController;
use Symfony\Component\HttpFoundation\Response;
final class CustomViewController extends MoonShineController
{
public function __invoke(): Response
{
return $this->json(message: 'Message', data: []);
}
}