dmahesh1705

dmahesh1705

Member Since 7 Months Ago

Hyderabad

Experience Points 410
Experience Level 1

4,590 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 0
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.

10 Sep
1 week ago

dmahesh1705 left a reply on Fetching Json Data From Request Body

Thanks @tykus, is this feature added recently?

dmahesh1705 started a new conversation Fetching Json Data From Request Body

I'm using Lumen 5.7, I've seen different posts on the internet for 'how to fetch JSON data from the request body'. But without using any middleware or no extra lines of codes, I'm able to fetch JSON data as PHP Array in the following ways.

#1 $request->post() // Output as array #2 $request->all() // Output as array #3 $request->input() // Output as array #4 $reqeust->isJson() // Output is true #5 $request->getContent() // Output as Json string

How this is happening without using any middleware to convert JSON data to PHP Array? Is because of anyone of the following reasons?

#1 My webserver, Nginx is doing? #2 Any composer package which I'm using is that doing? #3 Lumen 5.7 have this feature?

I had gone through with files under 'vendor' but nothing is helped me before using I want to know the reason behind this.

07 Aug
1 month ago

dmahesh1705 left a reply on How To Sending Task Scheduler Output As Email Attachment

I was looking for existing feature how we have emailOutputTo, anyhow thanks @aurawindsurfing for your answer. Will implement if nothing found!

dmahesh1705 started a new conversation How To Sending Task Scheduler Output As Email Attachment

I am aware of sending task scheduler output to a file and email but is there a way to send output to a file and send that file as an attachment especially in Lumen 5.7?

12 Jun
3 months ago

dmahesh1705 started a new conversation Unknown Error Is Sending To Slack Channel From Lumen Application

To get notify for uncatched and internal errors, I made the following changes to render function in Handler.php

if (App::environment('production')) { Log::channel('slack')->err($ex->getMessage() . '-' . $ex->getTraceAsString()); }

After this, I'm seeing the following errors are triggered to my slack channel but I'm not getting the reason for this error

(Array) #1 /var/www/html/my-application/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(418): Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}(Object(Laravel\Lumen\Http\Request)) #2 /var/www/html/my-application/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(171): Laravel\Lumen\Application->sendThroughPipeline(Array, Object(Closure)) #3 /var/www/html/my-application/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(108): Laravel\Lumen\Application->dispatch(NULL) #4 /var/www/html/my-application/public/index.php(28): Laravel\Lumen\Application->run() #5 {main}

Anyhow of you have an idea on this error?

24 Apr
4 months ago

dmahesh1705 left a reply on How To Use Mysql SavePoint Concept Using Laravel/ Lumen Query Builder?

@devfrey I had tried that earlier but following error encountered:

cannot execute queries while other unbuffered queries are active. laravel

dmahesh1705 left a reply on How To Use Mysql SavePoint Concept Using Laravel/ Lumen Query Builder?

Thanks, @devfrey for your reply. Currently, I'm doing this as following

DB::connection()->getpdo()->exec('BEGING'), DB::connection()->getpdo()->exec('Savepoint SP1'), DB::connection()->getpdo()->exec('ROLLBACK SP1')

Something like this but don't know above approach is proper or not.

23 Apr
4 months ago

dmahesh1705 started a new conversation How To Use Mysql SavePoint Concept Using Laravel/ Lumen Query Builder?

We have the following functions

DB::beginTransaction() DB::commit() DB::rollback()

but how to use 'SavePoint' concept in Laravel.

27 Feb
6 months ago

dmahesh1705 started a new conversation How To Disable Mysql Strict Mode In Lumen 5.7

How to disable Mysql Strict Mode in Lumen 5.7. Like other important points seems like this point also missed in Lumen documentation.

31 Jan
7 months ago

dmahesh1705 started a new conversation How To Achieve Deferred Service Provider Mechanism In Lumen?

Its very sad to know that there is no default implementation for deferred service provider mechanism in Lumen. Still is there any possibility to achieve this feature in Lumen? I still don't understand my Lumen team has removed some great features of Laravel in Lumen like FormRequest validation and this one, though all these features are used in REST too.

In Lumen documentation they mentioned service provider feature in Lumen is similar to Laravel's but its seems like its not the same. Most the things like this only, it would be better to have separate documentation for Lumen instead of redirecting to Laravel.

30 Jan
7 months ago

dmahesh1705 started a new conversation Laravel/ Lumen FormRequest Throwing Error On Submitting All Valid Values

I'm using this library for formRequest feature in my Lumen application. I had installed and configured as mentioned in docs but there seems to be somewhere I might be missing or issue in library. Following is my sample code

Validation Class: <?php namespace App\Http\Requests;

use Pearl\RequestValidate\RequestAbstract;
use Illuminate\Validation\Rule;
use Illuminate\Http\Response;

class CommentFormRequest extends RequestAbstract
{

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {

        return [
            'name' => 'required'    
            'title' => 'required|max:255',
            'body' => 'required',
        ];
    }

    /**
     * Get custom messages for validator errors.
     *
     * @return array
     */
    public function messages()
    {
        return [
            //
        ];
    }
}

Controller:

<?php
namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Http\Requests\CommentFormRequest;

class CommentController extends Controller
{

    public function add(CommentFormRequest $request)
    {
        $request->validated();

       return response()->json(['Success']);
    }       

}

When I submit invalid data from postman, valid errors are thrown but when I submit valid data without missing any form field then following error is showing.

(1/1) BadMethodCallException
Method App\Http\Requests\CommentFormRequest::validated does not exist.

Above error totally making me confusion because if validated method is not found then how its throwing error for invalid data? I had tried to debug the issue but as I'm new to Lumen nothing I'm able to figure it out to fix this issue.