skip to Main Content

Get daily data for Laravel 5.4 – Phpmyadmin

I want to get daily data from my database. I try 2 code and both are not working for me. $sales=Sale::whereDate('created_at', '=', Carbon::today()); The error that I got: Class 'AppHttpControllersCarbon' not found and when I try $sales=Sale::whereDay('created_at', now()->day)->get(); The error…

VIEW QUESTION

How to get the type of the user in laravel? – Phpmyadmin

I want the code to check if the current user category is admin or superadmin, it will show the edit panel @if (Auth::user()->category=='admin'||Auth::user()->category=='superadmin') <td class="center"> <a href="{{ route('Order.edit', ['id'=>$order->id ]) }}" class="btn btn-warning btn-sm custom"> <i class="glyphicon glyphicon-edit"></i> EDIT</a> </td>…

VIEW QUESTION

Laravel Get File Contents of Image but Not Working on Production Environment – CentOS

My code bellow working on localhost development <img class="img-fluid rounded-circle" src="{{ url('image?type=user&file='.Auth::user()->picture_file.'&mime='.Auth::user()->picture_mime) }}" alt="Image Description"> will access imageController with get method using this link image?type=user&file=USER000053.png&mime=image/png class ImageController extends BaseController { public function get(Request $request){ $file=Storage::disk($request->type)->get($request->file); return response($file,200)->header('content-Type',$request->mime); } } bellow…

VIEW QUESTION
Back To Top
Search