terumi
Guest pages using the filament layout.
Hello people, I searched the channel again and again. Although some people insinuated that they found the solution and where asking for details, I didn't manage to have any progress on that.
I want to make a page, (ideally with a form) to be shown when the user navigates to /message and not to /admin/message.
I want the page to use the guest middleware and not forcing the user to login.
Also I want to use the css filament uses for showing all the good stuff it shows.
Right now I have
in my web.php
Route::get('/page', function(){
return view('custom-guest-page');
});
and the custom-guest-page.blade.php is:
<x-filament::page>
<div class="flex flex-col items-center justify-center min-h-screen bg-gray-100">
<div class="max-w-md px-8 py-6 mt-4 bg-white shadow-lg rounded-lg">
<h2 class="text-2xl font-bold text-center text-gray-700">Welcome to Filament</h2>
<p class="mt-4 text-gray-600">
This page is rendered using the Filament guest layout.
</p>
</div>
</div>
</x-filament::page>
When I navigate to /page I get
Using $this when not in object context
does anyone knows what I can do?7 replies
Importing with extra data
Hello people, is it possible to import some data to the application using the csv importer but to add extra data using a select box?
I want to do something like
ImportColumn::make('campaign')
->relationship(Campaign::class, 'name'),
ImportColumn::make('surname')
->requiredMapping()
->rules(['required']),
Select::make('some_data')
->options(['asd', 'sasd', 'etc'])...
Is that possible?
3 replies
Passing another Model to an Action instead of that that the Table iterates through
I know what I've written sounds convoluted but what I basically want to achieve is this:
I have a table that takes a "fake" model that derives from a view-table in my database (because of "impossible" relations, max, mins etc).
I display the data of the fake model "viewASDs" and on each row I have an edit function by which I want to edit the corresponding "ASD" model.
I've set up the record() method of the table ( ->record(fn() => ASD::find($record->id)) ) but that seems to refer to something else. Whenever I try to call
mutateRecordDataUsing(), using() etc, the methods take as an argument the viewASD model.
Is there a way to perform actions to another model than the one that the table iterates through?
3 replies
Persist toggleable column state between sessions
Hello,
It is a way to persist the toggled state of a column?
Some of my users want to see their data by default deferently from others but I cannot find a way to persist their table.
Is it possible?
13 replies
Multi-select update events?
Hello people,
I have a multi-select form field that when a new items is added to it, does not trigger an event. I'm doing it like this:
Does anyone know how can I make the value addition/deletion update my record?
Thank you!
2 replies
How to fill form in a custom page?
hello people.
I made a new custom page on a resource with
Now, I want to display a form for the record I hooked up to the page using:
I made a form and I put it in the blade file.
The form is being displayed but is isn't filled.
I used fill() on the form but still the form is empty.
Anyone knows what's wrong?
6 replies
Custom page model instance
Hello people,
I made a new custom page for a filament resource with
And it created two files:
How can I pass now the instance of the model record whose view link I clicked?
I'm being redirected to tickets/{ticket_id} but I cannot find anywhere how I can show the ticket properties.
Any help would be greatly apreciated 🙂
7 replies