Category : laravel-nova

I have a Flexible::make containing an Image::make function. My database is definitly set up correctly. When i try to insert or update an Image in the section, i dont receive an entry for the image. The other attributes work. My Nova File: Flexible::make(‘middle_section3_items’) ->addLayout(‘middle section3 items’, ‘middle_section3_items’, [ Text::make(‘Title Part1’, ‘title1’)->withMeta([‘extraAttributes’ => [‘maxlength’ => 18]]), ..

Read more

I am using Nova in laravel for designing the page,i am writing some rules function which will allows digits:20 . Text::make(‘TrackID’,’id’)->rules(‘nullable’,’digits:20′ )->sortable()->nullable()->hideFromIndex(), while updating the data if the numbers are more that it should throw an error like Max 20 digits allowed, now i want to give the length dynamically ,How to do that one ..

Read more

How can the Multiselectfield be updated when the default field changes , to show the list with the default office removed. Multiselect NovaServiceProvider- public function boot(){ parent::boot(); $office = { 100: "USA", 101: "Canada", 101: "India"}; //from api $defaultOffice = nova_get_setting(‘default_office’); $exludedOffice = $office; unset($exludedOffice[$defaultOffice]); OptimistDigitalNovaSettingsNovaSettings::addSettingsFields([ Panel::make(‘Settings’, [ Select::make(‘Default office’)->options($office), Multiselect::make(‘Exclude office’)->options($exludedOffice), ]), ]); } ..

Read more

I recently tried to deploy my laravel Nova project in docker, and my search brought me to laravel sail. So having the default docker-compose.yml file included in the project, I ran the ‘sail up’ command in my project working directory ./vendor/bin/sail up This command downloaded and setup the images specified in the docker-compose.yml file version: ..

Read more

I recently tried to deploy my laravel Nova project in docker, and my search brought me to laravel sail. So having the default docker-compose.yml file included in the project, I ran the ‘sail up’ command in my project working directory ./vendor/bin/sail up This command downloaded and setup the images specified in the docker-compose.yml file version: ..

Read more

I used Laravel Breeze in Laravel Nova to generate scaffold code for registering a user. When a user go to registering an account, he goes to the /register route. All the Breeze code is working. But when account is created, it redirect to RouteServiceProvider::HOME class RegisteredUserController extends Controller { public function store(Request $request) { $request->validate([ ..

Read more

I am using Nova Settings in which a Color picker field is used. NovaServiceProvider- OptimistDigitalNovaSettingsNovaSettings::addSettingsFields([ Panel::make(‘Colors’, [ Color::make(‘Primary color’)->slider(), Color::make(‘Secondary color’)->slider(), ]), ]); $primary-color = nova_get_setting(‘primary_color’); In my CSS file – :root { –primary-color: rgb(255, 0, 0); //want the nova color setting to be used here –secondary-color: rgb(255, 197, 6); } How can the Nova ..

Read more

According to the documentation we have the possibility to return toast messages when actions are being run. The success message of these can be shown using this kind of code: return Action::message(‘It worked!’); return Action::danger(‘Something went wrong!’); The problem is that these messages are on screen for only a few seconds. I am currently working ..

Read more

Breadcrumbs is a tool that adds a clickable path to nova resources to help with navigation. Unfortunately, after I follow the steps in the installation manual like so: app/Providers/NovaServiceProdivder.php: use LaravelNovaNovaApplicationServiceProvider; class NovaServiceProvider extends NovaApplicationServiceProvider … public function tools() { return [ ChrisWareNovaBreadcrumbsNovaBreadcrumbs::make(), ]; } app/Nova/Resource.php: <?php namespace AppNova; use LaravelNovaHttpRequestsNovaRequest; use LaravelNovaResource as NovaResource; ..

Read more

I want to pass $defaultFrom from NewsletterController.php: <?php namespace AppHttpControllers; use AppMailNewsletterMail; use IlluminateSupportFacadesDB; use IlluminateSupportFacadesMail; class NewsletterController extends Controller { public function send() { $defaultFrom = ‘[email protected]’; DB::table(‘newsletter_mails’)->insert([‘from’ => $defaultFrom]); $emails = DB::select(‘select * from newsletters order by id desc’); foreach ($emails as $email) { Mail::to($email)->send(new NewsletterMail()); } } } to NewsletterMail.php: <?php namespace ..

Read more