dd() not show the collection in laravel but show in inspect network

1.1k Views Asked by At

The main problem is dd() is not showing anything in the browser(both chrome and firefox) in my entire project for any variable. there i mention one example. i can save and do all other stuffs but dd() show nothing. In my controller i use the below code...

public function store(Request $request){

        $file = $request->file('avatar');
        $filename = time().'.'.$file->getClientOriginalExtension();
        $file->storeAs('public/images', $filename);

        $empData = [
            'first_name' => $request->fname,
            'last_name' => $request->lname,
            'email' => $request->email,
            'phone' => $request->phone,
            'post' => $request->post,
            'avatar' => $filename,
        ];

        dd($empData);

there dd($empData); show just nothing. when i inspect the code i see the below result in network preview-

enter image description here

array:6 [ "first_name" => "ff" "last_name" => "ff" "email" => "[email protected]" "phone" => "45435" "post" => "543534" "avatar" => "1656478823.jpg"]

why dd() show nothing in browser ?? I have some other projects and they are working fine. this project the laravel version is 8

1

There are 1 best solutions below

1
Edson Lima On

Are you accessing the route/function through an ajax request? If so, this is why your dd is showing in the network panel