princeoo7

princeoo7

Member Since 2 Years Ago

Experience Points
5,190
Total
Experience

4,810 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
13
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 2
5,190 XP
Jan
15
1 week ago
Activity icon

Started a new Conversation End_date Should Be Greater Then Start_date Validation

I have the below in my $request validation.

        $validatedData = $request->validate([
            'title' => "required|max:255",
            'description' => "required",
            'start_date' => "required",
            'end_date' => "required",
            'company_id' => "required",
        ]);

how to check if the end_date is not less than start_date. it should always be greater than start_date.

Dec
18
1 month ago
Activity icon

Replied to Has Anyone Worked With Laravel, Socket.io And Flutter ?

As of now, firebase cloud messaging.

Dec
17
1 month ago
Activity icon

Started a new Conversation Send Only Json Response For Api And Not An Actual Page In Laravel

I have an issue were I always get a html response in laravel for the api. how to force a json response instead ?

Dec
14
1 month ago
Activity icon

Replied to Three Way BelongsToMany Relation Ship In Laravel Eloquent

I was thinking that if a table can store group sessions against the task and then we can call a count for every task that completed, givens use the end result. but how to do with pivot table and get the count also against the task id is what i am stuck with.

Activity icon

Replied to Three Way BelongsToMany Relation Ship In Laravel Eloquent

Theoretically, no, user can have multiple groups. but I had made it so that practically they can be assigned to multiple groups.

In terms of Schema, it's our normal users and tasks table structure is as below:

     Schema::create('tasks', function (Blueprint $table) {
        $table->bigIncrements('id');
        $table->string('group_id');
        $table->string('title');
        $table->text('description');
        $table->string('start_date');
        $table->string('end_date');
        $table->integer('status_id')->default(2);
        $table->bigInteger('creator_id');
        $table->bigInteger('moderator_id');
        $table->timestamps();
        $table->softDeletes();
    });

for the groups table:

    Schema::create('groups', function (Blueprint $table) {
        $table->bigIncrements('id');
        $table->string('name');
        $table->text('description');
        $table->integer('status_id')->default(2);
        $table->bigInteger('creator_id');
        $table->bigInteger('moderator_id');
        $table->timestamps();
        $table->softDeletes();
    });

Activity icon

Replied to Three Way BelongsToMany Relation Ship In Laravel Eloquent

That is what I was confused about. should I make a task_user table and pass group_id as a third parameter. or is there a better way to do that. a user can perform the same task over and over if they prefer and we need to keep track of the count for that task by every user. the overall scenaior is going to give the total score for the group for that task.

e.g in group 1

  • user 1 can do task 1 for 3 times.
  • user 2 can do task 1 for 1 time. so the group 1 score is 4.

in group 2

  • user 3 can do task 1 for 0 times.
  • user 4 can do task 1 for 1 time. so the group 2 score is 1.
Activity icon

Replied to Three Way BelongsToMany Relation Ship In Laravel Eloquent

yes groups can have multiple tasks which can be same also. that's the reason i am in this dilema XD

Dec
13
1 month ago
Activity icon

Replied to Three Way BelongsToMany Relation Ship In Laravel Eloquent

yes. its the total number of a particular task completed by that group. and as per the above example, it will be for Task 1 currently there is no completed column. as I am still confused about how to make the tables and what to do with this.

Activity icon

Started a new Conversation Three Way BelongsToMany Relation Ship In Laravel Eloquent

I have three tables. Tasks, Groups, Users. The relationship, for now, is like, group_task, group_user.

What I want to do is get the number of the task for a group where multiple users many have completed. how to get that?

do I need to create a task_user relationship and add group_id as third parameter? what will be the table name and how will I user attached() on that table.

my end goal is:

  1. with the name of the task, show the total score of all groups under that task. e.g.
name: Task 1
  -> group 1 | score 20
  -> group 2 | score 0
  -> group 3 | score 10

Dec
07
1 month ago
Activity icon

Replied to Eloquent With, WithCount Gives 12 As Total Records But The Function With Groupby On Date Gives 9

can you give me an example for my case as still confused over how I should use the resources as I have never used it...

Dec
06
1 month ago
Activity icon

Replied to Belongs To Many Count Based On Created_at And Task_id In Laravel

also the below gives null created_at and updated_at fields, when i do $user->tasks()->attached($task_id);

Schema::create('user_task', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('user_id');
            $table->integer('task_id');
            $table->timestamps();
        });
Activity icon

Replied to Belongs To Many Count Based On Created_at And Task_id In Laravel

facing this issue with completed() fucntion removed .errorCall to a member function getRelationExistenceCountQuery() on int in file /Users/x/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php on line 383

Activity icon

Started a new Conversation Belongs To Many Count Based On Created_at And Task_id In Laravel

I have 2 tables User and Task. I am connecting then with belongsToMany relationship.

At the moment I can user $user->Task()->attach($task_id) this gives me a record for user and the task they completed.

the only problem that at the moment i am facing is,

  1. How to get total number of task completed by the user, that is the count of records in task_user table.
  2. How to get the total number of days the user have done the task. It's therotically sime with groupByon created_at column in task_user table.

please help me figure this out. also i would like this to be done some way in user model instead of query as i will be using this in queit a lot of places.

currently what i have in user model is:

public function Task(){
        return $this->belongsToMany(Task::class)->groupBy('Task_id');
}

Dec
05
1 month ago
Activity icon

Started a new Conversation Eloquent With, WithCount Gives 12 As Total Records But The Function With Groupby On Date Gives 9

I have 3 tables, Users, Tasks, TasksSession.

what I am trying to find is total session conducted and total days the user was involved in that task based on created_at group by statement.


    User::with(['Task','TotalSessionsGroupByDate'])->withCount(['TotalSessions','TotalSessionsGroupByDate'])->whereId(2)->first(),


With the above total_sessions_group_by_date_count = 12 and total_sessions_group_by_date_count = 9 records in an array.

function code for the TotalSessionsGroupByDate is as followed


    public function TotalSessionsGroupByDate(){
        return $this->hasMany(TaskSession::class)->groupBy('created_at');
    }

I have the total number of the session conducted / attendance but how to get the total number of days irrelevant to sessions. as per the example, total_sessions_group_by_date_count should be 9 and not 12 total_sessions_group_by_date_count.

the only solution that i was as of now, able to come up is as below:


$user = User::with(['TaskIssues','TotalSessionsGroupByDate'])
                        ->withCount(['TotalSessions'])
                        ->whereId(16)->first();
        $user->TotalSessionsGroupByDate = $user->TotalSessionsGroupByDate->count();

any better way to do the same in model?

Nov
27
2 months ago
Activity icon

Replied to How To Create Custom Log Folder For The Date And Custom Log File Based On Task In Laravel

do you have any idea about below ?

    'stderr' => [
        'driver' => 'monolog',
        'handler' => StreamHandler::class,
        'formatter' => env('LOG_STDERR_FORMATTER'),
        'with' => [
            'stream' => 'php://stderr',
        ],
    ],
Activity icon

Started a new Conversation How To Create Custom Log Folder For The Date And Custom Log File Based On Task In Laravel

I have 3 -5 task daily planned. what i want is to get log details based on task in separate file so that when i need to read the log, its not to big and easy to find. also, I want this log files to be created in a folder under log folder with date as name.

example:

-log (folder)
    -2019-11-27 (folder)
        -errors.log
        -task1.log
        -task2.log
        -task3.log

    -2019-11-28 (folder)
        -errors.log
        -task1.log
        -task2.log
        -task3.log

    -2019-11-29 (folder)
        -errors.log
        -task1.log
        -task2.log
        -task3.log

and so on...

Activity icon

Started a new Conversation Get List Of Users As Subscribers Belonging To Group Table And Issue Table In ScheduleMessage Table Record

I basically have 4 main tables

  1. Users ( default of Laravel )

  2. Group ( using belonsToMany relation to get Subscribers )

  3. Issue ( using belonsToMany relation to get Subscribers )

  4. ScheduleMessage table here I want to get users who are in a group and issue to whom I want to send Message / Mail / Notifications.

How to do that in the model?

currently, in the controller, this is what I am going

return $record = ScheduleMessage::with(['group','issue', 'creator', 'RepeatOn', 'moderator', 'status'])
                                    ->whereId($schedule_message->id)->first(); 

with this data, I also want the list of users which belongs to given group_id and issue_id. how can I do this?

Nov
26
2 months ago
Activity icon

Awarded Best Reply on Belongs To Many Relation Not Working As Second Param Is Always Zero

the proble was with migration, by mistake i changes bigIncrements on id to bigInteger and that was the root cause. closing the issue now.

Activity icon

Replied to Belongs To Many Relation Not Working As Second Param Is Always Zero

the proble was with migration, by mistake i changes bigIncrements on id to bigInteger and that was the root cause. closing the issue now.

Activity icon

Replied to Belongs To Many Relation Not Working As Second Param Is Always Zero

here you go:

in model ScheduleMessage

public function RepeatOn() {
    return $this->belongsToMany(Day::class);
}

the issue is that i have the foreach loop for schedule message, normally their should be id but not 0 for schedule_message_id in table day_schedule_message but it is 0 and that is the issue.

Activity icon

Started a new Conversation Belongs To Many Relation Not Working As Second Param Is Always Zero

I have a table named schedule_messages and other days. I want to implement eloquent relation of belongsToMany, my issue is while seeding DB, I always get schedule_message_id as 0.

code: migration code:

    Schema::create('day_schedule_message', function (Blueprint $table) {
        $table->bigInteger('day_id');
        $table->bigInteger('schedule_message_id');
        $table->primary(['day_id', 'schedule_message_id']);
    });

code of seeder:

   foreach(range(1, 100) as $i){
        $id = mt_rand(1,100);
        $message = Message::whereId($id)->first();
        $nday = $faker->dateTimeBetween('now', '+1 month');
        $oday = $faker->dateTimeBetween('-1 month', 'now');
        $day_type = rand(0,1);
        $day = $day_type ? $nday : $oday;

        $record = ScheduleMessage::create([
            'title' => $message->title,
            'group_id' => rand(0,1) ? 0 : mt_rand(1,100),
            'issue_id' => $message->issue_id,
            'content' => $message->content,
            'url' => rand(0,1) ? 'https://www.prodevplus.com' : '',
            'trigger_at' => $day->format('Y-m-d H:i:s'),
            'status_id' => rand(0,1) ? 5 : 4,
            'type' => $day_type ? 0 : 1,
            'day' => date('dS M, Y', strtotime($day->format('Y-m-d H:i:s'))),
            'time' => date('H:i:s A', strtotime($day->format('Y-m-d H:i:s'))),
            'creator_id' => mt_rand(1,100),
            'moderator_id' => mt_rand(1,100),
        ]);
        
        if($day){
            $random_number_array = range(1,20);
            shuffle($random_number_array);
            $random_number_array = array_slice($random_number_array ,0,10);
            $record->RepeatOn()->attach($random_number_array);
        }

    }

in day_schedule_message table, schedule_message_id is always 0 (zero).

where am I making mistake?

Oct
15
3 months ago
Activity icon

Started a new Conversation How To Create Fake Blog Content With Html Code And Not Real Text In Faker

i wan to generate random blogs for testing. the issue is that with faker i am able to generate real text but it's just plain text and don't contain html tags. as per faker doc we have htmlLorem but i have not used it as it will generate form html and header which is what i don't want.

is their a way to achieve this in laravel ?

Oct
13
3 months ago
Activity icon

Replied to Where Clause On Eloquent Relation Returns Data Even On False Condition

how will it work here ? i am unable to understand it from the document base.

public function scopeHaveChildren($query){
    return $query->where(['status' => 1, 'is_parent'=> 1]);
}

public function children()
{
    return $this->scopeHaveChildren()->hasMany(Category::class, 'parent_id');
}

Activity icon

Replied to Where Clause On Eloquent Relation Returns Data Even On False Condition

that would be possible in controller but how to implement this in the model of category ?

@snapey replied above.

Oct
12
3 months ago
Activity icon

Replied to Where Clause On Eloquent Relation Returns Data Even On False Condition

@ftiersch so what is the solution her in my case ? i want apply the is_parent case on the parent and not on the children.

Oct
11
3 months ago
Activity icon

Replied to Where Clause On Eloquent Relation Returns Data Even On False Condition

below is the example where you can clearly see that is_parent is false, still it give me 2 children.

id  1
name    "Category 1"
slug    "category-1"
is_parent   "0"
parent_id   null
banner  "http://example.com/assets/images/no-img.svg"
views   "0"
creator_id  "1"
moderator_id    "1"
created_at  "2019-10-10 14:53:56"
updated_at  "2019-10-10 14:53:56"
parent  null
children    
0   
    id  13
    name    "Category 13"
    slug    "category-13"
    is_parent   "1"
    parent_id   "1"
    banner  "http://example.com/assets/images/no-img.svg"
    views   "0"
    creator_id  "1"
    moderator_id    "1"
    created_at  "2019-10-10 14:53:56"
    updated_at  "2019-10-10 14:53:56"
1   
    id  50
    name    "Category 50"
    slug    "category-50"
    is_parent   "1"
    parent_id   "1"
    banner  "http://example.com/assets/images/no-img.svg"
    views   "0"
    creator_id  "1"
    moderator_id    "1"
    created_at  "2019-10-10 14:53:56"
    updated_at  "2019-10-10 14:53:56"

Activity icon

Replied to Where Clause On Eloquent Relation Returns Data Even On False Condition

their are no conditions based on is_parent. i am just trying to fetch category with children from the same table. their are 2 column which are "is_parent" and "parent_id" that's it. and as per the code submitted above, in model i have a function called children and here i want to filter out children data only if is_parent is 1 (true) else return nothing.

Oct
10
3 months ago
Activity icon

Started a new Conversation Where Clause On Eloquent Relation Returns Data Even On False Condition

in my model, below is the code

public function children()
    {
        return $this->hasMany(Category::class, 'parent_id')->where('is_parent', 1);
    }

but i still get data for both the conditions. where is_parent == 0 and is_parent == 1.

their is data for the children for every record but i want to have a switch where if i turn it off, children should not have data.

did i miss some logic here ?

Sep
12
4 months ago
Activity icon

Started a new Conversation Custom Error Messages For Only Api For Cases Like Integrity Constraint Violations And All In Laravel 6

Coming straight to the point, how to have custom errors for the errors such as integrity violations or any such error which needs to tell user in simple words, what when wrong ...

like instead of,

{
        "success": false,
        "error": "SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry..."
}

who can i tell them

{
        "success": false,
        "error": "Your email id is already registered with us. please try to login or use forgot password to recover the account ..."
}

some thing of this sort, only on api level.

Sep
11
4 months ago
Activity icon

Replied to API Help Need In Laravel As It Returns Humans_21909=1

i when and had a conversation with the hosting team and they tested it out and it's working fine on their end. i tried testing it with mobile network and its working fine. so what exactly is going wrong ? is it on server of only network issue.

Activity icon

Replied to API Help Need In Laravel As It Returns Humans_21909=1

@snapey i am right now talking to hosting provider on the same. let me get back to you with an update :)

Activity icon

Replied to API Help Need In Laravel As It Returns Humans_21909=1

@joveice i tried it before posting , so no it's not helpful in my case...

Activity icon

Replied to API Help Need In Laravel As It Returns Humans_21909=1

that is the error i am getting on the postman posting form data. perfectly works on localhost. no error at all.

Sep
10
4 months ago
Activity icon

Started a new Conversation API Help Need In Laravel As It Returns Humans_21909=1

I am getting the following error on postman trying top post data on a live staging server api.

<script>
    document.cookie = "humans_21909=1"; document.location.reload(true)
</script>

i was getting this error on laravel 5.8 after some days but then today i uploaded the laravel 6 version code. its still the same as before. what has gone wrong ? its api so token issue shall not be their as i am trying to do a user registration.

Aug
30
4 months ago
Activity icon

Started a new Conversation Product Table Related Query !

I was trying to search for a schema for product table in laravel and found one on laravelsd.

link below:

https://laravelsd.com/share/K5oG9a

now i am confused about product, product attribute, attribute, attribue value tables.

on the other hand some thing with slight change with value for attribute been stored in the relation table of product and attribute is suggested in below link on laracast itself.

https://laracasts.com/discuss/channels/laravel/attributes-for-products-in-given-category?page=0

so what is the most efficient way to implement it then ?

Activity icon

Replied to Custom Validation Message For Unique Email Id Or Other Fields

the public funtion message () is suppose to be in the model of user for this ? because if so, it didn't worked for me as i tried.

Activity icon

Started a new Conversation Custom Validation Message For Unique Email Id Or Other Fields

I want to implement a custom error message for users email been registered with the system. below is the default error message over api. how to modify it ?

i when through this : https://laravel.com/docs/5.8/validation#customizing-the-error-messages but it bounced over my head.

{
        "error": {
            "email": [
                    "The email has already been taken."
            ]
        }
}

Aug
29
4 months ago
Activity icon

Replied to Has Anyone Worked With Laravel, Socket.io And Flutter ?

So instead of laravel echo, use laravel socket package ?

But as of now for flutter I have only seen laravel echo package been ported, will it work with your suggested package ?

Aug
28
4 months ago
Activity icon

Started a new Conversation Has Anyone Worked With Laravel, Socket.io And Flutter ?

i am currently learning how to build flutter app and was planning to implement the laravel and mysql as backend.

its not that hard unless the broadcast comes in. i haven't ever used broadcast in laravel projects as of yet.

while after searching i found that pusher is free for 100 connections and after that it's paid service. i tried to search a package for the flutter side but no relaible package is yet available.

while searching a pusher package for flutter, i stumble upon this package: https://github.com/kakajansh/echo

here it supports socket.io and pusher but pusher is yet under work. so socket.io was something i started looking into and found, it's a library and this package is a port of laravel echo which is free.

has anyone ever used this combination in a project ? any tutorial i can refer to make a flutter app with laravel , mysql and socket.io as to broadcast events or data.

by the way i was building a simple chatting app as of now while learning. it as firebase version in teaching but in future, laravel is something i am looking to use as a backend so need imput on the same for auth, data storage and notifications or real time app.

thank you for going through my request. have a nice day / afternoon / evening / night ahead :)

Aug
25
5 months ago
Activity icon

Replied to Update Images Of Image Gallery In Laravel

i can delete the old image but the issue is how to find the exact record where the image needs to be replaced. for e.g i would want to add one new image as well as update one of several old image. so even if i am checking if the request have a file or not then still how should i know if the image is for update or insert ...

Activity icon

Replied to Update Images Of Image Gallery In Laravel

mid, name, caption and alt text is what i am getting in array format and later on based on index of any one array, i can get the respective data from other arrays to that image.

this is how i know the logic. might be not so effective but if some one have any better solution. please enlighten me on the same.

Aug
24
5 months ago
Activity icon

Replied to Update Images Of Image Gallery In Laravel

also one might add a new image too while updating the gallery

Activity icon

Replied to Update Images Of Image Gallery In Laravel

$request->mid is the media id and not gallery id.

<input type="hidden" name="mid[]" :id="image.id">

this is the filed in my form.

Activity icon

Started a new Conversation Update Images Of Image Gallery In Laravel

i have created a image gallery for testing purpose and creating one is working, only issue is in update. i know here somewhere my i have missed something and not able to properly implement the logic. please have a look at the below code.

public function update(Request $request, $id)
{
    // return $request->all();
    $media = Media::whereId($id)->first();
    // return $media;
    $mediaItem = MediaItem::whereMediaId($id)->get();
    // return $mediaItem;
    
    if($request->hasFile('images')){            
        foreach($request->images as $key => $image){
            try {
                $item = Storage::disk('public')->put('/media',  $image);
                $media->update(['banner' => $item]);
                $mediaItem = MediaItem::create([
                    'media_id' => $media->id, 
                    'name' => $request->imgTitle[$key], 
                    'original_name' => $image->getClientOriginalName(),
                    'size' => $image->getSize(), 
                    'mime' =>  $image->getClientMimeType(),
                    'description' => $request->imgCaption[$key], 
                    'alt_text' => $request->imgAltText[$key], 
                    'type' => 'image', 
                    'view' => 0, 
                    'source_location' => 'local', 
                    'source' => $item,
                ]);
            } catch (Exception $e) {
                session()->flash('error', 'Error: '.$e->getMessage());
                dd($e->getMessage());
            }
        }
    } else {
        foreach($mediaItem as $key => $item){
            foreach($request->mid as $mkey => $mitem){
                if($item == $mitem){
                    $item->update([
                        'title' => $request->imgTitle[$key],
                        'description' => $request->imgCaption[$key],
                        'alt_text' => $request->imgAltText[$key],
                    ]);
                }
            }
        }
    }

    session()->flash('success', 'Media Gallery: '.$media->id.' Successfully Updated !');
    return redirect()->route('media.index');
}

what not working is the update where it creates a new entry where it should have updated the current one. i figured out that the issue is where i am checking it the file have been submitted or not but then how to identify which record it update.

Aug
13
5 months ago
Activity icon

Started a new Conversation Mail Suit In Laravel ?

Is it possible to have a gmail like app build in laravel ? what needs to be done ? i am not aware about this. we can use the smtp server to send email but if we want to receive email and store it for future reference how to do that ? normally our hosting already does that, how to do this in laravel like mobile app.

sorry if i might sound confused :/

Activity icon

Replied to How To Get Display Pluck Column From A Model Function In Blade File

@tdamir yes adding first() instead of get() worked :D thank you for your assistance :)

Activity icon

Replied to How To Get Display Pluck Column From A Model Function In Blade File

@tdamir : did not worked unless i added [0] after get() :/

Activity icon

Replied to How To Get Display Pluck Column From A Model Function In Blade File

ok i was trying for it and found this:

Pluck with multiple Columns

code works but don't know if this is the right way of doing it ...

public function status()
    {
        return $this->hasOne(Status::class, 'code', 'status')->select('name', 'color')->get()[0];
    }

Activity icon

Replied to How To Get Display Pluck Column From A Model Function In Blade File

this is what i get as an collection:

Collection {#363 ▼
    #items: array:1 [▼
        "green" => "Active"
     ]
}