Help with custom resource page
I have created a custom resource page and added its entry in
getPages()
method like this:
'print' => Pages\PrintCouponBatch::route('/print/{record}')
I want the view for this page to use a custom layout. Also I am not able to access the $record
in the view. {{ $record }}
shows variable undefined whileas the doc says, the route param should be available in view.
Any help with this will be appreciated.4 Replies
I was able to access the record using
mount()
method on PrintCouponBatch
class by doing
Now I want a custom blank layout for the page and not default admin panel container.change your page $layout from “layouts.app” to “layouts.base”
But there is no
layouts.base
defined. Or is it?
Will have to create a new one.Source dive in the Page class, go to the parent BasePage class, and copy the $layout attribute to your page class, and make the change