Category : laravel-nova

I am using laravel nova dashboard for my PHP project. I am badly stuck at one point. On Production, the pipeline failing on one AWS Instance. I am getting this error. "failed to register layer: Error processing tar file(exit status 1): write /var/www/html/vendor/epartment/nova-dependency-container/docs/demo.gif: no space left on device"] Please help me Sourc..

Read more

Starting with Laravel Trends and i’m able to display a chart like the following following the documentation return $this->countByDays($request, User::class) ->showLatestValue(); Is it possible to show the sum of all users registered in that period instead of the current value? Keep the daily graph, but for example instead of 6 would show something like 50. ..

Read more

Created HasMany Laravel Nova field, on the related resource added indexQuery where joined another table. But as a result I got another ID and created_at in the result table. HasMany::make(‘Changes log’, ‘logger’, AppNovaMyResource::class), In MyResource /** * Get the fields displayed by the resource. * * @param IlluminateHttpRequest $request * @return array */ public function ..

Read more

I have the following schema: store ——— id name product_category —————- id store_id name product ——- id store_id name product_category_to_product —————————- product_id category_id I am using Laravel Nova to build an Admin Dashboard. I have created the following relation in the Product Model public function categories(){ return $this->belongsToMany(ProductCategory::class, ‘product_category_to_product’, ‘product_id’,’category_id’); } The issue is when ..

Read more

I need to order some users by surname, but they are stored with full names. I created a field named ‘alpha’ in the db. For example William Shakespeare must be stored as shake I tried to create a custom field on Nova, but it’s probably wrong. Hidden::make(‘Alpha’, ‘alpha’)->default(function () { $author_name = explode(‘ ‘, $this->name); ..

Read more

How can the text field be set based on the select box in Nova Laravel? eg: if the user selects Option as 100, Option Name should be "First Option" (options array is dynamically called) $options = [ 100 => "First Option" 101 => "Second Option" 102 => "Third Option" ]; Select::make(‘Option’)->options($options), Text::make(‘Option Name’)->readonly(); Sourc..

Read more

I have model looks like this folowing Product model code: public class Product extends Model { public function types() { return $this->belongsToMany(Type::class) ->withPivot(‘published’); } } and here the Types model: public class Type extends Model { public function products() { return $this->belongsToMany(Product::class) ->withPivot(‘published’); } } in nova ProjectResource I have this following field : BelongsToMany::make(‘Types’) ..

Read more

I am working with Laravel Nova and I am trying to allow the client to upload several images at once to avoid redundant work. I found a library called; Advanced Nova Media Library (https://github.com/ebess/advanced-nova-media-library) which apparently allows to do what I am looking for. I followed what the documentation said, it means In my models, ..

Read more

Is there any simple way to create range of ‘this week’, ‘last week’ in the ranges function in value metric? Or maybe can I use starting and ending date in the ranges function? that will also do the job. For example: public function ranges() { return [ ‘TODAY’ => __(‘Today’), $thisWeek => __(‘Week To Date’), ..

Read more