deepu07

Member Since 1 Year Ago

Experience Points 26,920
Experience Level 6

3,080 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 226
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

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

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

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

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

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

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

31 May
2 weeks ago

deepu07 left a reply on Building Nested Array Within Nested Array .

@ncltours if you share in github I can take a look.

30 May
2 weeks ago

deepu07 left a reply on Building Nested Array Within Nested Array .

@ncltours from above post what I'm understanding is you wanna display a roomRates array under the accommodation array . so that means accommodation array may have more than one roomRates array in it? or single array??

deepu07 left a reply on Undefined Variable Count

@remanbala If you want you can this way as well.


$todo->count();

try this one?

deepu07 left a reply on Laravel Queue Failure Does Not Trigger Failed() Method If There's An Exception, But RaiseFailedJobEvent() Works

@mkrell Thanks for reply. I figure it out that guy FYI. It is working for me. I'm just firing an event whenever job gets failed.

23 May
3 weeks ago

deepu07 started a new conversation How To Fire An Event Whenever Job Gets Failed

Hi guys I wanna fire an event whenever laravel job gets failed. I’m trying to use

    {
        event(new JobFailed($exception));
    }```
Somehow it is not firing. do you guys have any idea why it is not firing?
15 May
1 month ago

deepu07 started a new conversation Laravel Jobd

Hi guys, how to return/send response from job to controller in laravel?

11 May
1 month ago

deepu07 left a reply on Json API - $POST

without seeing code hard to debug the problem. :sad

deepu07 left a reply on Json API - $POST

It should work. I did a couple projects with guzzle. what err you're getting? May be you need an API key to access the API rqst

deepu07 left a reply on Php Artisan Serve Not Working

what is the status code you are seeing in console?

deepu07 left a reply on Json API - $POST

Do you wanna save that results in your db or jus display?

deepu07 left a reply on Json API - $POST

can you elaborate more? do you want to display a response of textarea data?

deepu07 left a reply on Php Artisan Serve Not Working

@akaleniu Are you getting any err in console?

deepu07 started a new conversation Laravel Vue I.e. Data Passing From One Component To Another Component

Hi Guys, I want to pass data from one vue component to another vue component. Am I doing wrong here. This is what I'm doing in my code. any help/suggestion that would be great. Thanks in advance.

HomeComponent.vue (i.e. POST input)

  export default {
    data() {
      return {
        form: {
          name: '',
          city: '',
          email: ''
        },
        show: true
      }
    },
    methods: {
      submit() {
       this.errors = {};
       axios.post('/input', this.form).then(response => {
            this.$eventBus.$emit('submit', response);
          if(response.status === 200) {
               this.$router.push({ path : '/city' , response});
            }
      }).catch(error => {
        if (error.response.status === 422) {
          this.errors = error.response.data.errors || {};
        }
      });
    }
  }
</script>


CityComponent.vue (i.e. GET /city)

```<script>
  export default {
    data() {
      return {
        results: {}
        }
    },
    methods: {
      fetchData() {
       this.errors = {};
       this.$eventBus.$on('/city', (response => {this.results = response.data})
      ).catch(error => {
        if (error.response.status === 422) {
          this.errors = error.response.data.errors || {};
        }
      });
     }
    }
  }```
05 May
1 month ago

deepu07 left a reply on Passing Data From One Vue To Another (redirect And Display)

@mushood you are right. you got my point. I don't have any response/request for /city. Bcse I'm submitting form through /input. I'm getting response back from third party API. even I'm not saving the response in DB. I want to submit input through one route and display the response in another route. I'm pretty new to Vue Js.

deepu07 left a reply on Passing Data From One Vue To Another (redirect And Display)

@Not Really. I don't have any permissions stuff yet.

deepu07 left a reply on Passing Data From One Vue To Another (redirect And Display)

@punksolid yes. After reloading i can able to see POST reqst response in dev tools. but unable get it..

deepu07 started a new conversation Passing Data From One Vue To Another (redirect And Display)

Hi Everyone, I have one quick question how to redirect to another page after clicking on submit and display a response. using Laravel and Vue. Here is my vue method for submit() submit() { this.errors = {}; axios.post('/input', this.form).then(response => { if(response.status === 200) { this.$router.push({ path : '/city' }); } }).catch(error => { if (error.response.status === 422) { this.errors = error.response.data.errors || {}; } }); } Yes it is redirecting to new page but somehow unable to fetch response data. Laravel Route for form submit POST /input and redirecting to GET /city fetchData() { this.errors = {}; axios.get('/city').then (response => (this.response = response.data) ) } Am I doing something wrong? New to vue. Any suggestions or help that would be great Thanks!

22 Apr
1 month ago

deepu07 started a new conversation Fetch Array Values Without Index Values

Hi This is my array

  0 => "5cb3f3df9b5d7e25d02faf"
  1 => "5cb545649b5d7e55807dc9"
  2 => "5cb696c55f43ef0e981415"
  3 => "5cb7e8623b3fd71157082e"
  4 => "5cb939e63b3fd740f93852"
]```
I want to fetch only values without indexes. How can I achieve that?
Anyhelp that would be great. Thanks!
03 Apr
2 months ago

deepu07 left a reply on Load Css From S3

It was auth problem. resolved.

deepu07 started a new conversation Load Css From S3

How to load CSS dynamically from AWS S3 Bucket. Somehow it is not rendering in the browser. Here is my code @if(Auth::user()->role != user) @endif

In my console I'm getting like this GET http://s3.amazonaws.com/testing/css/2.css net::ERR_ABORTED 403 (Forbidden)

How to resolve this err? Any help that would be great. Thanks in advance.

01 Apr
2 months ago

deepu07 started a new conversation Laravel Validation

Hi guys, Somehow it is always displaying a validation err 'stylesheet' => 'nullable|mimes:text/css' Am I doing something wrong?? Thanks in advance

31 Mar
2 months ago

deepu07 left a reply on Laravel API Keys In AWS

@ricardo so let me ask in this way How to manage Laravel API keys securely in AWS ? any idea...

deepu07 started a new conversation Laravel API Keys In AWS

Hi Guys, How to store API keys in AWS?? any suggestions/help that would be great. Thanks!

28 Mar
2 months ago

deepu07 left a reply on Laravel Storage Files

Solved. Thanks!

deepu07 started a new conversation Laravel Storage Files

Hi guys, below code is working fine if I upload Image but my requirement is I want to upload .css or .php or .js file and save in my local. How can I do that?

            $image = $request->file('sheet');
            $filename = auth()->user()->name . '.' . $image->getClientOriginalExtension();
            \Image::make($image)->save( public_path().'/uploads/' . $filename );
        }```
Thanks!
26 Mar
2 months ago

deepu07 left a reply on Current User Details

@cronix thanks for reply. Here is my thing I'm using Laravel-backpack package in my project. My job is change css dynamically for the backpack dashboard based on logined user. rn Backpack has a file i.e. Config\backpack\base.php file here we can change the css for the dashboard So I want to find user details and based on user I want to apply css dynamically. Any ideas how to achieve this?

deepu07 left a reply on Auth::user() Is Returning Null In Notify Class, But User Is Logged In

@bimalshah72 @saqueib do you guys any idea how to find current user info inside of the Config/app.php file? Any help that would be great. Thanks!

deepu07 left a reply on Current User Details

Somehow inside of Config\app.php file it is recognizing the helper function and also no luck with Facade too.

deepu07 started a new conversation Current User Details

Hi, How to get user details in Laravel App/Config file or Is there anyway to get current user details by creating a helper or service ?? Any suggestions/help would be great. Thanks!

25 Mar
2 months ago

deepu07 left a reply on Dynamic Stylesheets

Thanks @s

deepu07 started a new conversation Dynamic Stylesheets

Hello Guys, I have one quick question. which is the most efficient way to change css dynamically based on logged user (roughly I have 30+ users). I have 2 ways in my mind

Approach-1. Storing a stylesheet values in db directly like primary, secondary colors and user_id. Get values and apply dynamically. Approach-2. Write style sheets and create a table for written stylesheets and user_id. And get stylesheets based on logged user.

what you guys think on these approaches? Which one you like or do you have anything efficient approaches for this scenario. Looking forward to hear from you guys. Any ideas/suggestion that would be great. Thanks in Advance.

Note: using Laravel, Backpack for Admin panel

deepu07 left a reply on Change CSS Dynamically

Thanks for your reply. Do you think which is right way ` to creating a table (user_id, primary_color, secondary_color) for styles or writing a stylesheets individually and storing written stylesheets with user_id foreign key? which approach will be the efficient?

deepu07 started a new conversation Change CSS Dynamically

Hi, I hope someone can help with this Change admin dashboard UI (using Laravel-backpack) based on logged User I have a table for Users and one for styles (includes primary and secondary color columns). There is a one to one relationship. I would like to change some css attributes like colors i.e. UI depending on which 'User' is loggined. What would be a good practice to do this? Any ideas/suggestions that would be great. Thanks!

23 Mar
2 months ago

deepu07 started a new conversation Deploying Existing Laravel In Aws Linux

Hello guys, I have one quick question "Im trying to deploy existing laravel website into aws ec2. everything went well after some trails. but somehow I',m getting this err"

The Mix manifest does not exist. (View: /var/www/html/blog-develop/resources/views/layouts/app.blade.php) (View: /var/www/html/blog-develop/resources/views/layouts/app.blade.php)```
does anyone has experienced before??
Thanks In advance.  and also googled for the solution but no luck at all.
18 Mar
2 months ago

deepu07 started a new conversation Passport With Laravel Backpack

Hi, in my project I'm using backpack for admin dashboard now for auth I want to install passport on top of backapack. Looking for any code samples/suggestions how the things will work ... Any help that would be great. Thanks in advance.

17 Mar
3 months ago

deepu07 started a new conversation Backpack-API

Hi Guys, one quick question how to connect/access external api into laravel-backpack? any ideas/suggestions.

08 Mar
3 months ago

deepu07 left a reply on Display Custom Error Msg

@jsenger thanks. It works! Even if url has an invalid id i want to display id in error message dynamically. how can I access $id value in render method? do you have any idea for that?

deepu07 started a new conversation Display Custom Error Msg

Hey guys, I have one quick question In my laravel project I want to customize findOrFail method error msg. how can I do that? is it a good idea to overwrite/modify core functions of framework?

    {
        $result = $this->find($id, $columns);

        if (is_array($id)) {
            if (count($result) === count(array_unique($id))) {
                return $result;
            }
        } elseif (! is_null($result)) {
            return $result;
        }

        throw (new ModelNotFoundException)->setModel(
            get_class($this->model), $id
        );
    }```

I want display `return response()->json(['status'=>'succ' 'msg'='error msg'], 404);` 
any help that would be great. Thanks!
28 Feb
3 months ago

deepu07 started a new conversation Laravel API GroupBy Format

Hi Guys this my logic. In result I want to display all the records groupBy subject_id. (In input user can pass multiple subjectIds). with this logic im not getting results in groupBy format. How can I do that? any help that would be appreciated. Thanks


        $data = [];
   
        foreach ($subjects as $subjectId) {
            $student = Student::select(['*'])
                                ->where('subject_id', $subjectId)
                                ->orderBy('grade')
                                ->get()
                                ->toArray();
                                
            array_push($data, $student);
        }
        return response(['success' => true, 'data' => $data]);```

deepu07 left a reply on Sorting Multidimensional Array By One Value

getting like this """ [{"course_id":"423","subject_number":"30","subject_name":"Se 30","start_year":"2009","end_year":"2009"}, \n {"course_id":"424","subject_number":"31","subject_name":"Sea 31","start_year":"2010","end_year":"2010",}, \n .......

deepu07 left a reply on Sorting Multidimensional Array By One Value

@bobbybouwmann thanks for reply in my case $collection = collect($array[0]['students']); is giving back the result in students collection. But $collection->sortBy(function ($item) { return $item['start_year']; }); giving an err like this (1/1) ErrorException Illegal string offset 'start_year'

deepu07 started a new conversation Sorting Multidimensional Array By One Value

Hi Guys, My Api result is like this. Here I want to display students orderBy('start_year') in result. How can I achieve that. Any help that would be appreciated. Thanks!

  324 => array:2 [
    "subjects" => array:2 [
      0 => array:7 [
        "id" => "4"
        "name" => "abc"
        "type" => "Arts"
      ]
      1 => array:7 [
        "id" => "7"
        "name" => "ghi"
        "type" => "Music"
      ]
    ]
    "students" => array:35 [
      0 => array:11 [
        "course_id" => "19"
        "subject_number" => "30"
        "subject_name" => "Season 30"
        "start_year" => "2016"
        "end_year" => "2009"
      ]
      1 => array:11 [
        "course_id" => "196"
        "subject_number" => "31"
        "subject_name" => "Season 31"
        "start_year" => "2007"
        "end_year" => "2010"
      ]
      2 => array:11 [
        "course_id" => "5722343234"
        "subject_number" => "2018"
        "subject_name" => "Season 2018"
        "start_year" => "2018"
        "end_year" => "2018"
      ]
  ]
]```
18 Feb
3 months ago

deepu07 left a reply on Get All The Records By Using Explode

yeah but I want display include ids

"success": true,
"data": [
"id" :1 {
"roll_nuber": 4,
"first_name": "FDA Approves MEDICREAs K-JAWS(R",
"last_name": null,
"gender": null,
"graduated_year": null
},
"id" :2 {
"roll_nuber": 5,
"first_name": "Berlin Heart Completes Enrollment in the EXCOR Pediatric Ventricular Assist Device (VAD) Post Approval Study",
"last_name": null,
"gender": null,
"graduated_year": null
},
"id" :3 {
"roll_nuber": 6,
"first_name": "Futura Mobility Enters into Telemedicine Partnership with REACH Health",
"last_name": null,
"gender": null,
"graduated_year": null
},
"id" :4 {
"roll_nuber": 7,
"first_name": "Harvard SEAS Engineers Develop Portable NMR Spectrometers",
"last_name": null,
"gender": null,
"graduated_year": null
}
]
}```

deepu07 left a reply on Get All The Records By Using Explode

Added $data = []; foreach ($studentIds as $studentId) { $data[$studentId] = []; } Bcse I want to display id object with details but getting like this

    "success": true,
    "data": {
        "4": [],
        "5": [],
        "6": [],
        "7": [],
        "8": {
            "roll_nuber": "[email protected]",
            "first_name": "Destinee",
            "last_name": "Hoeger",
            "gender": "Male",
            "graduated_year": "2000-01-01"
        },
        "9": {
            "roll_nuber": "[email protected]",
            "first_name": "Shyanne",
            "last_name": "Johnson",
            "gender": "Female",
            "graduated_year": "2000-01-01"
        },
        "10": {
            "roll_nuber": "[email protected]",
            "first_name": "Verona",
            "last_name": "Reynolds",
            "gender": "Female",
            "graduated_year": "2000-01-01"
        },
        "11": {
            "roll_nuber": "[email protected]",
            "first_name": "Randy",
            "last_name": "Daugherty",
            "gender": "Female",
            "graduated_year": "2000-01-01"
        }
    }
}```

deepu07 left a reply on Get All The Records By Using Explode

Getting like this array_push() expects parameter 1 to be array, null given

deepu07 left a reply on Get All The Records By Using Explode

@NAGRAJ722 - Hi @nagraj722 Getting like this Undefined variable: studentId I think we need to add foreach loop

17 Feb
4 months ago

deepu07 started a new conversation Get All The Records By Using Explode

Hi Guys Can anyone help me out (URL: http://localhost/getStudents/4:5:6:7) Even 4,5,6,7 records existed in database but not getting all the records and displaying only last record. How to display all the existed records in output? Thanks in advance

```public function getStudents($ids)
{   
    if(!$ids) 
        return "Please enter a valid student id";

    $studentIds = explode(':', $ids);

    $data = [];

    // fill output with blank data
    foreach ($studentIds as $studentId) {
        $data[$studentId] = [];
    }
    $students = Student::where('id', $studentId)->get();

    if(!$students)
        return "No Students are found with this . '$studentId' .";
    
    foreach ($students as $student) {
        $studentData=[];
        // $data[$studentId] = [];

        $studentData['roll_nuber'] = $student->roll_number;
        $studentData['first_name'] = $student->first_name;
        $studentData['last_name'] = $student->last_name;
        $studentData['gender'] = $student->gender;
        $studentData['graduated_year'] = $student->graduated_year;
        array_push($data, $studentData);
    }
    return response(['success' => true, 'data' => $data], 200);
}```

output

    "success": true,
    "data": {
        "4": [],
        "5": {
            "roll_nuber": "[email protected]",
            "first_name": "Destinee",
            "last_name": "Hoeger",
            "gender": "Male",
            "graduated_year": "2000-01-01"
        }
    }
}```