Soundmit
Soundmit
FFilament
Created by Soundmit on 12/16/2024 in #❓┊help
Builder + curator + multilanguage
10 replies
FFilament
Created by Soundmit on 11/29/2024 in #❓┊help
Form field
thanks @Dennis Koch
5 replies
FFilament
Created by Soundmit on 10/16/2024 in #❓┊help
Avoid ID in edit page
registered the page
public function register(Panel $panel): void
{
$panel
->pages([
SettingsPage::class,
]);
}
public function register(Panel $panel): void
{
$panel
->pages([
SettingsPage::class,
]);
}
20 replies
FFilament
Created by Soundmit on 10/16/2024 in #❓┊help
Avoid ID in edit page
it works! - made a settings page in the plugin with form and the other methods - added this to the form
->statePath('data')
->model(SettingModel::class);
->statePath('data')
->model(SettingModel::class);
20 replies
FFilament
Created by Soundmit on 10/16/2024 in #❓┊help
Avoid ID in edit page
Yes, I know how to do this, but I would like to create a plugin so that when it's installed, it creates the table, etc. Is there a way to create a page within the plugin or to make the plugin itself create the page for me?
20 replies
FFilament
Created by Soundmit on 10/16/2024 in #❓┊help
Avoid ID in edit page
i understand but this is a collection of settings related to the website's frontend, like logo, site name, description, seo... i've tried to used a pair of filament's settings plugin but i need multi language settings and they doesn't support translations
20 replies
FFilament
Created by Soundmit on 10/16/2024 in #❓┊help
Avoid ID in edit page
Even with that, there must be something that connects those 30 rows right? nope, they are just settings that i want to use in the frontend (i'm developing a custom frontend solution for filament)
20 replies
FFilament
Created by Soundmit on 10/16/2024 in #❓┊help
Avoid ID in edit page
is it possible to use custom pages i plugin?
20 replies
FFilament
Created by Soundmit on 10/16/2024 in #❓┊help
Avoid ID in edit page
I don't need to pass an ID. I've built a custom settings management system as part of a larger plugin. It features a single form that saves each setting as a separate row in a database table. In the end, this results in around 30 rows. When editing, I want to update all the rows simultaneously. I know I can create a custom page in Filament, but since I'm developing a plugin, I haven’t found detailed information on how to build a custom page within the plugin rather than using the default list/create/edit pages.
20 replies
FFilament
Created by ahusons on 8/24/2024 in #❓┊help
I want to embed a youtube video in filament richeditor. Is this possible?
any update?
2 replies
FFilament
Created by Soundmit on 2/4/2024 in #❓┊help
Approval system
nope, the project is 'abandoned' at the moment
7 replies
FFilament
Created by Soundmit on 7/31/2024 in #❓┊help
Moving routes inside plugin break the app
after some researche, middleware are applied only if the routes are defined in the main route. to solve this i opted for a php code in the layout
5 replies
FFilament
Created by Soundmit on 7/31/2024 in #❓┊help
Moving routes inside plugin break the app
all the cache are cleared if i put back the rout in the main web.php all works fine, plugin routes/web.php also work beacause i can put a debug here
5 replies
FFilament
Created by Soundmit on 7/31/2024 in #❓┊help
Moving routes inside plugin break the app
Route::get('/news', [CategoryController::class, 'index'])->name('news.index'); //Tutte le news

Route::get('/news/{slug?}', [NewsController::class, 'show'])->name('news.show'); //Singola news

Route::get('/news/c/{slug?}', [CategoryController::class, 'index'])->name('category.index'); //News per categoria
Route::get('/news', [CategoryController::class, 'index'])->name('news.index'); //Tutte le news

Route::get('/news/{slug?}', [NewsController::class, 'show'])->name('news.show'); //Singola news

Route::get('/news/c/{slug?}', [CategoryController::class, 'index'])->name('category.index'); //News per categoria
as is, without modification but i get an error not present before i have a LocaleMenu controller in the app that serves for the menu translations

<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;
use Detit\Polipages\Models\Page;
use Illuminate\Support\Facades\View;
use RyanChandler\FilamentNavigation\Models\Navigation;

class LocaleMenu
{
public function handle(Request $request, Closure $next)
{
dd('LocaleMenu');
$locale = app()->getLocale();
$mainMenuHandle = "main-menu-{$locale}";
$footerMenuHandle = "footer-menu-{$locale}";

// $mainMenuItems = $this->getLocalizedMenuItems($mainMenuHandle, $locale);
$mainMenuItems = Navigation::fromHandle($mainMenuHandle);
View::share('mainMenuItems', $mainMenuItems);

// $footerMenuItems = $this->getLocalizedMenuItems($footerMenuHandle, $locale);
$footerMenuItems = Navigation::fromHandle($footerMenuHandle);
View::share('footerMenuItems', $footerMenuItems);

return $next($request);
}
}

<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;
use Detit\Polipages\Models\Page;
use Illuminate\Support\Facades\View;
use RyanChandler\FilamentNavigation\Models\Navigation;

class LocaleMenu
{
public function handle(Request $request, Closure $next)
{
dd('LocaleMenu');
$locale = app()->getLocale();
$mainMenuHandle = "main-menu-{$locale}";
$footerMenuHandle = "footer-menu-{$locale}";

// $mainMenuItems = $this->getLocalizedMenuItems($mainMenuHandle, $locale);
$mainMenuItems = Navigation::fromHandle($mainMenuHandle);
View::share('mainMenuItems', $mainMenuItems);

// $footerMenuItems = $this->getLocalizedMenuItems($footerMenuHandle, $locale);
$footerMenuItems = Navigation::fromHandle($footerMenuHandle);
View::share('footerMenuItems', $footerMenuItems);

return $next($request);
}
}
as you can see, this controller sets a pair of variable that i use in my view but, after moving the news route, i get Undefined variable $mainMenuItems because the localeMenu is not loaded at all this controller is registered in bootstrap/app

->withMiddleware(function (Middleware $middleware) {
$middleware->web(append:[
\App\Http\Middleware\LocaleMiddleware::class,
\App\Http\Middleware\LocaleMenu::class,
]);

})

->withMiddleware(function (Middleware $middleware) {
$middleware->web(append:[
\App\Http\Middleware\LocaleMiddleware::class,
\App\Http\Middleware\LocaleMenu::class,
]);

})
5 replies
FFilament
Created by Soundmit on 7/30/2024 in #❓┊help
Help with builder field and multilanguage
3 replies
FFilament
Created by Soundmit on 6/28/2024 in #❓┊help
Add Printjs to infolist action
Thank you, tomorrow I will try
16 replies
FFilament
Created by Soundmit on 6/28/2024 in #❓┊help
Add Printjs to infolist action
any chance to use printjs? my app is working, but in the infolist when i print a label/invoice etc the pdf is opened in the same tab, after printing the pdf i have to hit the browser's back button to comback to the app.. not so friendly
16 replies
FFilament
Created by Soundmit on 6/28/2024 in #❓┊help
Add Printjs to infolist action
I've already spent 3 hours on this. Is what I'm trying to do feasible, or am I wasting my time?
16 replies