Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 02:02
    promatik commented #3479
  • 01:05
    welcome[bot] commented #3479
  • 01:05
    abdfttysn labeled #3479
  • 01:05
    abdfttysn opened #3479
  • Jan 22 19:35

    tabacitu on flash-alerts-to-session

    (compare)

  • Jan 22 19:35

    tabacitu on master

    flash warning alerts to session… Merge pull request #228 from La… (compare)

  • Jan 22 19:35
    tabacitu closed #228
  • Jan 22 15:41
    IoanAndrei97 labeled #3478
  • Jan 22 15:41
    IoanAndrei97 opened #3478
  • Jan 22 04:22
    mahasadhu commented #3453
  • Jan 22 00:06
    promatik assigned #1545
  • Jan 21 23:59
    promatik assigned #3441
  • Jan 21 23:59
    promatik commented #3420
  • Jan 21 23:53
    scrutinizer-notifier commented #3477
  • Jan 21 23:53
    scrutinizer-notifier commented #3477
  • Jan 21 23:42
    promatik closed #2962
  • Jan 21 23:42
    promatik commented #2962
  • Jan 21 23:40
    scrutinizer-notifier commented #3477
  • Jan 21 23:39
    promatik review_requested #3477
  • Jan 21 23:39
    promatik assigned #3477
Cesc
@francescjr_twitter
Hello everyone, I have a problem with this, the error is: "Class 'App\User' not found (View: C\Users...login.blade.php), i don't know what i have to do, i followed all the instructions. I'm desasperated. If someone can help me, i will appreciate it.
Wesley Smith
@DoDSoftware
@francescjr_twitter If you're like most people using laravel, you've probably put your user model in App\Models\User, or, if you're using laravel 8, I believe it puts it there by default now. If either is true, please update login.blade.php to look forr App\Models\User instead of App\User
@antony.peiris_gitlab Gotcha, yeah that makes sense Id like to see those too. Next time im working with something along those lines Ill certainly look at trying to make a tutorial out of it :)
Pedro Martins
@pxpm
Just an heads up, to properly configure your user model is inside the config file config/backpack/base.php and look for: user_model_fqn
after you change it to match your application you should clear config cache to make sure configs are reloaded php artisan config:clear
1 reply
Ayman Abi Aoun
@lambasoft
Hello, anyone mind helping me resolve my issue: Laravel-Backpack/PermissionManager#254
Wesley Smith
@DoDSoftware
@lambasoft answered via your issue
Ghost
@ghost~5f75684ed73408ce4ff060fc
We had a couple of websites written for us by a software house, they have uses backpack for the administrator side of the application, anyway they have split ties with us and now supplied us the application so we may host it ourselves, here lies the problem, they have not supplied us with a licence, so when we try to access the administration side we are presented with a 404 page and a message about using unlicensed software, my question is should they have supplied a license after all we have paid for this development, the reason I ask this is, that they are saying we need to get a license, so not sure what I need to do on this, looking for help
Pedro Martins
@pxpm
@simon_arnold_twitter if they should have give you the licence code based on what you paid/asked from that company is something we can't argue on, it's your business and theirs so we backpack can't do much about it. The 404 page I don't think it's related with the unlicensed software. If you are interested you can check out https://backpackforlaravel.com/pricing to see what licensing fits you better. If you need further help feel free to post here or in stackoverflow, we have an active community very willing to help others.
paperscissors
@paperscissors
I guess this is a related question --- is there not an upgrade pricing from a 3 to 4 license?
paperscissors
@paperscissors
A little rough if you're coming from an unlimited license
Pedro Martins
@pxpm
@paperscissors the best person to ask that would be Cristian himself. Shout him an email: hello@tabacitu.ro
jorgepires
@jorgepires
Hi, anyone aware of a public project using backpack for ticket handling system?
Wesley Smith
@DoDSoftware
@jorgepires Not offhand, though for what its worth, if I was going to set up a ticket handling system, I'd probably use software specifically designed for it like Atlassian's Jira Service Desk.
jorgepires
@jorgepires
Hi @DelightedD0D , I use JIRA in my company but thinking on creating a more simple one for the customer support, and if some open project was already on the wild would contribute to it as well
Wesley Smith
@DoDSoftware
@jorgepires I see. For what it's worth, I love Backpack and you could potentially build a ticketing system with it though I'm not sure I'd use it for that purpose myself. If you find something or make it yourself we'd definitely like to see what you come up with :)
wejdan m
@wejdan.alohaideb_gitlab
Hi guys, I have been looking for a way to display column in show blade only if one column has certain value but i could not find results can anyone help?
@jorgepires there is already a JIRA service desk that you can use it for clients and combine it with your company JIRA
Guillermo Baron
@guillorrr

If you have a Scope on that model, you can add the scope with $this->crud->addScope(’scopeName’, $param)

Hi! I try to use this help in setupListOperation but not working.

Guillermo Baron
@guillorrr

This is my scope


public function scopeTeamDescendants($query, $user_id)
{
    return $query->where('id', '=', $user_id)
                    ->with('descendants')
                    ->first()
                    ->descendants;
}

This is my crudcrontoller

// This working ok (24 results)
dd(User::TeamDescendants(2020));

// This only get 1 result
CRUD::addClause('TeamDescendants', 2020);

// This return: CrudPanel::addScope does not exist.
$this->crud->addScope('TeamDescendants', 2020)

// This return: Method Illuminate\\Support\\Collection::getCountForPagination does not exist.
$this->crud->query = $this->crud->query->where('id', '=', $user_id)
                    ->with('descendants')
                    ->first()
                    ->descendants;

I use this Laravel Eloquent extension: https://github.com/staudenmeir/laravel-adjacency-list for relathionships

or anyOne who can answer this above link
HmInt0101
@HmInt0101
Can i use all the clauses in addClause(); like whereBetween etc
Wesley Smith
@DoDSoftware
@HmInt0101 Please see my comment on your question
Wesley Smith
@DoDSoftware
@guillorrr $this->crud->addClause('teamDescendants, 2020); Is correct, however, that teamDescendants scope itself seems a bit off. Could you please create a question on stackoverflow.com including the code you show here, the related model classes, and an explanation of what exactly the teamDescendants should do, then tag it with backpack-for-laravel and post the link here? Im sure with that information we can help get you sorted :)
@HmInt0101 Indeed, the addClause method calls return call_user_func_array([$this->query, $function], array_slice(func_get_args(), 1)); meaning you can use it to add any query method supported by laravel and whatever params you send with it will be forwarded correctly to that method, including whereBetween and using closures and such
Dino Cisterna
@DinnoCisterna
Hi
How are they? I have a problem creating a repeatable field based on a relation.
Wesley Smith
@DoDSoftware
Hi @DinnoCisterna Could you please create a question on stackoverflow.com including your CRUD Controller code and the related model classes, then tag it with backpack-for-laravel and post the link here? Im sure with that information we can help get you sorted :)
HmInt0101
@HmInt0101
how do i set checkbox true in laravel-backpack
HmInt0101
@HmInt0101
it is possible to get the last-session OR user-agent in laravel-backpack
ShekharKokate
@ShekharKokate
Hi Everyone,
I have installed elfinder and connected with amazon s3. But, it is taking too much time to load all the images because it is near about 1000 images are uploaded.
Is there any solution to increase the speed so that it will take less time.
Pedro Martins
@pxpm
@HmInt0101 that's PHP. You can use whatever you want from PHP in Backpack. $_SERVER['HTTP_USER_AGENT']
HmInt0101
@HmInt0101
i was thinking that laravel-backpack uses some method for it
HmInt0101
@HmInt0101
In my update user form there is a email field, while updating other field it gives me error "Email is already in use". with laravel-backpack and I am using the UpdateUserCrudRequest class for this
plz need help
Pedro Martins
@pxpm
@HmInt0101 It works as expected in my demo: https://recordit.co/RPb1d0dAwE
HmInt0101
@HmInt0101
@pxpm can you share the code
Pedro Martins
@pxpm
HmInt0101
@HmInt0101
@pxpm my table's primary key not id, Iam using UUID
Pedro Martins
@pxpm
you setup protected $primary = "uuid" in your model ?
HmInt0101
@HmInt0101
yes
thats why when iam updating the record for email it is showing email is already taken
how to handle that?
Thomas Klopf
@perfectom_gitlab

hi everyone, please a question. I'm using 'relationship' field and while records are appearing when I load the page, modifications aren't being saved (adding new records nor removing). I have the following on my CrudController:

protected function fetchUser()
{
    // return $this->fetch(\App\Models\User::class);
    return $this->fetch([
        'name' => 'users',
        'model' => \App\Models\User::class, // required
        'searchable_attributes' => ['last_name', 'first_name', 'email'],
        'paginate' => 10, // items to show per page
        // 'query' => function($model) {
        //     return $model->active();
        // } // to filter the results that

    ]);

and the relationship config:

        [   // relationship
            'type' => "relationship",
            'name' => 'users', // the method on your model that defines the relationship
            'ajax' => true,

            // OPTIONALS:
            'label' => "Category",
            'attribute' => "email", // foreign key attribute that is shown to user (identifiable attribute)
            'entity' => 'users', // the method that defines the relationship in your Model
            'model' => "App\Models\User", // foreign key Eloquent model
            'placeholder' => "Select users", // placeholder for the select2 input

            // AJAX OPTIONALS:
            'data_source' => url("client/fetch/user"), // url to controller search function (with /{id} should return model)
            'minimum_input_length' => 2, // minimum characters to type before querying results
            // 'dependencies'         => [‘category’], // when a dependency changes, this select2 is reset to null
            // 'include_all_form_fields'  => false, // optional - only send the current field through AJAX (for a smaller payload if you're not using multiple chained select2s)
         ],

please any ideas what to check here? It's a 1-N relationship from client-> users, hope that's not causing issues.

I tried using 'select2_from_ajax_multiple' but I'm getting an error that the fetch URL will only accept POST, not GET, requests
windchime18
@windchime18

Hi everyone, is it possible to add or modify the search function? I'm trying to search an exact value to an encrypted table on the database. But it seems it doesn't work. I wanted to add this to the search function but I'm not sure how to implement it.

$items = User::all()->filter(function($record) use($searchValue) {
if((decrypt($record->SSN) == $searchValue) {
return $record;
}
});

Thomas Klopf
@perfectom_gitlab
sorry never mind about my question above. "relationship" doesn't support the 'inverse 1-N' scenario. I switched the relation to be N-N with an intermediary table (client_user) and it's working now.
Wesley Smith
@DoDSoftware
Hi @windchime18 you can overwrite the search functionality by adding a search method to your CRUD controller as explained here or if you want to add logic for specific columns you can use the search attribute logic feature