I have a posts table that has a json column “read_more_section”. And I want to store on that column the information regarding some fields on the NOVA CMS (title, description, label and link). Do you know how to properly do that in Nova? To store what is entered in these 4 fields in the json column “read_more_section”? Answer You could
Tag: laravel-nova
Is there a way to dynamically switch default dashboards in Nova
What I am looking for: A way to potentially load a appNovaDashboardsDashboardExample as the default dashboard. Problem Nova comes with a default dashboard which is build in the NovaServiceProvider and gives you the possibility to add additional dashboards using the dashboards() function. When using this dashboards() function, you initialize additional dashboards instead of loading in a different dashboard as the
Use a model (resource) attribute (accessor) with metrics in Laravel Nova
I have a MySQL table called purchases and a model called Purchase in Laravel that is related to it. My table has two columns, quantity and unit_cost. The total cost of a purchase is not a column in my table. Instead, it is defined by an accessor in Laravel that multiplies unit_cost by quantity and returns it as total_cost. Now
How to use an Interface Repository in a Laravel Nova Action?
I’m using the Laravel Repository Pattern to manage my resources and I was wondering how can I use an interface inside a Nova Action? Since an Interface cannot be instanciated, I was wondering how I could use my Interfaces within my action? In my Controller constructor I create my repository and then I’m able to use it within my functions,
Adding Data to Belongs to resource using TextField laravel Nova
Hi is there any way to insert data in two tables in one request laravel nova belongsTo relation What I am trying to achieve is that I have two models first is the user model & the second one is the student Model User model has email and password And student model has other profiling details of a student when
(Laravel) Change Nova Resource name? (only on interface)
I’m trying to change the display name of one Nova resource, without change the name from de database that it references. Only for View / interface purposes. I checked the AppNova*myResource*.php file and find this variable: But after change this the same old name still appears. Anyone knows how to resolve this? maybe I have just to type some comands
Return all table’s rows in a Select field laravel Nova
I would like to return to my select all the elements of my ‘categories’ table except the current line. I didn’t find anything about this on the internet, so I’m coming to you. My current item for Select: And this is the head of my categories table: Answer I understand you have a self referrencing relationship between the Category model,
laravel authorizeResource always denies access
I have created a resource controller for an API endpoint. I have also created a corresponding policy for the model. If I do a per method authorization check using then it works as expected. But if I add the following to the construct, I always get a 403 forbidden. Not sure what I am missing as the following should apply
PHP Laravel Nova returns 404
I’m working on a local laravel-nova project which worked fine the last couple of days. Now all of a sudden, when I try to go to the /nova route I get a 404 error saying Page could not be found. I tried with but with no luck. I even deleted the vendor-folder and ran composer install and php artisan nova:install
Laravel Nova Self-referential Relationship
In Laravel, if I want to create a self-referential relationship I can do the following: How can I make a Laravel Nova resource display this connection? Answer You can achieve what you want like this: This will allow to choose a parent post when you create or update a post. When you are in the detail page of a post,