Questions tagged [laravel-backpack]

Backpack for Laravel is a selection of Laravel packages designed to make building administrative panels easier. Use with the [laravel] and/or [php] tags

  • Backpack helps to build sections where your admins can manipulate entries ;CRUD Panels to perform most basic operations.
  • Backpack provides with a visual interface for the admin panel.

To know more about it visit backpack.

855 questions
2
votes
1 answer

How to fix error "Please use whereHasMorph() for MorphTo relationships." when using search function of Laravel BackPack?

I have a very simple One-to-Many polymorphic relationship as following. posts id - integer title - string videos id - integer title - string comments id - integer body - text commentable_id - integer …
O Connor
  • 4,236
  • 15
  • 50
  • 91
2
votes
0 answers

Laravel backpack Customized fields are not working for Edit and Update methods

I'm using backpack in my project. I’ve created a customized fields that is dropdown and select box. In one blade file I’m displaying two fields based on dropdown selection I’ll display the options for select box. So everything is working fine…
deepu
  • 107
  • 3
  • 10
2
votes
1 answer

BACKPACK Laravel manage extra columns in pivot table in a many-to-many relationship using Backpack CRUD

I'm using backpack for laravel and I'm trying to add/update some extra columns in a pivot table used in a many-to-many relationship. Summarizing the context: I have a model Task, another model Machine and this intermediate pivot table machine_task…
rbndeveloper
  • 123
  • 2
  • 8
2
votes
2 answers

How to implement custom_checklist_from_array? Like checklist but the data is inputted in CrudController

I want to use Checklist Field in laravel backpack, but it says that we have to need a relation with another table. But I would like to put the Options in my CrudController like select_from_array. I have no idea how to custom this field. I want to…
Andrew Wijaya
  • 191
  • 1
  • 9
2
votes
1 answer

Is there any "options" to filter query for "checklist" field? Like on select2_multiple. But I want to use checklist instead of select2_multiple

I use select2_multiple and I can use "options" like in the documentation example but can I use "options" in checklist field? I have tried to include "options" but nothing works $this->crud->addField([ 'label' => 'Printers', …
Andrew Wijaya
  • 191
  • 1
  • 9
2
votes
1 answer

Backpack CRUD Controller: show fields depending on model is editing

Can I setup CRUD Controller in the way to show fields depending on model is editing? Example: I have model with fields: id, type, field1, field2. For models with type=type1 I want to show only field1: $this->crud->addFields([ ['name' =>…
Max P.
  • 5,579
  • 2
  • 13
  • 32
2
votes
1 answer

Revisions gives "Date not found"

I followed the guidelines to make Revisions work, here: https://backpackforlaravel.com/docs/3.6/crud-operation-revisions I then cleared cache and route cache, then restart my artisan server. I can get the revisions button, but when I try to view my…
massimo colella
  • 83
  • 1
  • 11
2
votes
0 answers

backpack n-n relation error on adding record

https://laravel-backpack.readme.io/v3.0/docs/newscrud I follow this code to make n-n relation but when i add a new record to the subscriptions (articles in the example) table i get an error SQLSTATE[HY000]: General error: 1364 Field 'name' doesn't…
2
votes
2 answers

How do I specify an IN clause in laravel backpack?

How do I add an IN clause in laravel with backpack? This is what I am looking for: $this->crud->addClause('where', 'customer_id', 'in', [1,3,5,6,7]);` Should translate into something like this: select * from customer where customer_id in…
2
votes
0 answers

Laravel backpack: CRUD for polymorphic relations

Edit: I have figured out a way to do it using custom field and column types. If there is any interest, I will try to post my solution here, please let me know. I recently switched over to Laravel Backpack to manage my Admin Panel, but I am having a…
Adrenaxus
  • 1,593
  • 2
  • 18
  • 34
2
votes
1 answer

In Laravel Backpack - Column data in view details and XLS download is truncated

If the column data has approximately more than 50 characters the column gets truncated at around 50. addColumn function has 'type' => 'text' In the end there is [...] This is both in the details pop-up and XLS download. Question is, can this limit…
Rudolph
  • 139
  • 1
  • 8
2
votes
2 answers

Laravel Backpack. 1-1 (one-to-one) relation

I have 2 Eloquent models: /** * Entities/Products.php */ use CrudTrait; protected $fillable = [ 'name', 'macronutrients_id', ]; public function macronutrients() { return $this->hasOne(Macronutrients::class); } /** *…
NewEXE
  • 81
  • 8
2
votes
0 answers

forceScheme('https') breaks laravel backpack filters

I have the following code in my AppServiceProvider boot method, which is supposed to force HTTPS. Unfortunately, this is causing Laravel Backpack filters to not function properly. URL::forceScheme('https'); However, if I pull my git repo locally,…
2
votes
2 answers

Laravel-Backpack Getting data of 2 tables by join

I'm new using backpack for laravel and I'm trying to understand how could show data from DB in the default view that backpack use to display rows. I already read the documentation from the site but it's really poor, and have a lot of questions. I…
r9 ingenieria
  • 43
  • 1
  • 7
2
votes
3 answers

In Laravel Backpack - How to align a column to the right using addColumn

There is number column which represents price. How to align it to the right in the table grid. I tired $this->crud->addColumn([ 'name' => 'amount', 'type' => 'number', 'label' => 'Amount', 'align' =>…
Rudolph
  • 139
  • 1
  • 8