namespace App\MoonShine\Controllers;
use MoonShine\MoonShineRequest;
use MoonShine\Http\Controllers\MoonshineController;
use Illuminate\Contracts\View\View;
final class CustomViewController extends MoonshineController
{
public function __invoke(MoonShineRequest $request): View
{
return $this
->view('path_to_blade', ['param' => 'value'])
//->setLayout('custom_layout')
->render();
}
}
namespace App\MoonShine\Controllers;
use MoonShine\MoonShineRequest;
use MoonShine\Http\Controllers\MoonshineController;
use Illuminate\Contracts\View\View;
final class CustomViewController extends MoonshineController
{
public function __invoke(MoonShineRequest $request): View
{
return $this
->view('path_to_blade', ['param' => 'value'])
//->setLayout('custom_layout')
->render();
}
}
namespace App\MoonShine\Controllers;
use MoonShine\MoonShineRequest;
use MoonShine\Http\Controllers\MoonshineController;
use MoonShine\Pages\Page;
final class CustomViewController extends MoonshineController
{
public function __invoke(MoonShineRequest $request): Page
{
return MyPage::make();
}
}
namespace App\MoonShine\Controllers;
use MoonShine\MoonShineRequest;
use MoonShine\Http\Controllers\MoonshineController;
use MoonShine\Pages\Page;
final class CustomViewController extends MoonshineController
{
public function __invoke(MoonShineRequest $request): Page
{
return MyPage::make();
}
}
namespace App\MoonShine\Controllers;
use MoonShine\MoonShineRequest;
use MoonShine\Http\Controllers\MoonshineController;
use Symfony\Component\HttpFoundation\Response;
final class CustomViewController extends MoonshineController
{
public function __invoke(MoonShineRequest $request): Response
{
$this->toast('Hello world');
return back();
}
}
namespace App\MoonShine\Controllers;
use MoonShine\MoonShineRequest;
use MoonShine\Http\Controllers\MoonshineController;
use Symfony\Component\HttpFoundation\Response;
final class CustomViewController extends MoonshineController
{
public function __invoke(MoonShineRequest $request): Response
{
$this->toast('Hello world');
return back();
}
}
namespace App\MoonShine\Controllers;
use MoonShine\MoonShineRequest;
use MoonShine\Http\Controllers\MoonshineController;
use Symfony\Component\HttpFoundation\Response;
final class CustomViewController extends MoonshineController
{
public function __invoke(MoonShineRequest $request): Response
{
$this->notification('Message');
return back();
}
}
namespace App\MoonShine\Controllers;
use MoonShine\MoonShineRequest;
use MoonShine\Http\Controllers\MoonshineController;
use Symfony\Component\HttpFoundation\Response;
final class CustomViewController extends MoonshineController
{
public function __invoke(MoonShineRequest $request): Response
{
$this->notification('Message');
return back();
}
}
namespace App\MoonShine\Controllers;
use MoonShine\MoonShineRequest;
use MoonShine\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\MoonShineRequest;
use MoonShine\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\MoonShineRequest;
use MoonShine\Http\Controllers\MoonshineController;
use Symfony\Component\HttpFoundation\Response;
final class CustomViewController extends MoonshineController
{
public function __invoke(MoonShineRequest $request): Response
{
return $this->json(message: 'Message', data: [], redirect: null);
}
}
namespace App\MoonShine\Controllers;
use MoonShine\MoonShineRequest;
use MoonShine\Http\Controllers\MoonshineController;
use Symfony\Component\HttpFoundation\Response;
final class CustomViewController extends MoonshineController
{
public function __invoke(MoonShineRequest $request): Response
{
return $this->json(message: 'Message', data: [], redirect: null);
}
}