Crud: About the capabilities of Backpack

Created on 29 Oct 2019  路  6Comments  路  Source: Laravel-Backpack/CRUD

Hello, I'm just evaluating Backpack.
So far it seems quite practical. Is it possible to show a user only his own data, for example only his entries.
And I want one entry to have multiple related entries which can be declared in the entry itself. Is this also possible?
Thank you in advance

question

Most helpful comment

@Wulfheart - Yes, that is all possible. I just finished doing this with my company's application.

We have 220 store locations, each with their own customizable website and their own admin console. All data is kept in one global DB, with an identifier in each table that identifies which store the row belongs to. When a user visits their admin console they only see the data pertaining to their store.

In each CRUD controller you simply add an addClause() to the query. For example:

$this->crud->addClause('where', 'store_id', '=', config('local.store_id');

You can also add other clauses to find related entries.

Get Backpack. You won't regret it.

All 6 comments

Hello there! Thanks for opening your first issue on this repo!

Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps _a lot_ in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that.

Backpack communication mediums:

  • Bug Reports, Feature Requests - Github Issues (here);
  • Quick help (_How do I do X_) - Gitter Chatroom;
  • Long questions (_I have done X and Y and it won't do Z wtf_) - Stackoverflow, using the backpack-for-laravel tag;

Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome _awesome_ community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch.

Thank you!

--
Justin Case
The Backpack Robot

@Wulfheart - Yes, that is all possible. I just finished doing this with my company's application.

We have 220 store locations, each with their own customizable website and their own admin console. All data is kept in one global DB, with an identifier in each table that identifies which store the row belongs to. When a user visits their admin console they only see the data pertaining to their store.

In each CRUD controller you simply add an addClause() to the query. For example:

$this->crud->addClause('where', 'store_id', '=', config('local.store_id');

You can also add other clauses to find related entries.

Get Backpack. You won't regret it.

Ok, thank you really much.
If I have a person and want that person to have multiple vacation dates, is it possible to make them ordered by date in a table field?

@Wulfheart - Certainly! Backpack makes it easy. You would do something like this:

$this->crud->orderBy('vacation_start_date', 'ASC');

You can also use global scopes to make it easier

@Wulfheart Thanks for your interest in Backpack.

I hope you already started exploring around, it's really easy to get started.

Here we use Github Issues to track BUG's, Features and that kind of stuff.

More general questions it's better to ask on our gitter channel

If it's about licencing or other sales information please reach out on our contact page

I will be closing this, if you need something just let us know :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

voidstate picture voidstate  路  3Comments

AlexanderWM picture AlexanderWM  路  3Comments

sseggio picture sseggio  路  3Comments

sonoftheweb picture sonoftheweb  路  3Comments

deepaksp picture deepaksp  路  3Comments