Category "laravel"

Join columns of Day, Month , Year to calculate age

public function patients_view($id) { $patient = Patients::where('id', '=', $id)->first(); // .... } I just need to view the age. Thanks , im usin

How to configure ngnix, vite and laravel for use with HMR via a reverse proxy?

I've only just got into Laravel/Vue3 so I'm working off the basics. However, I have an existing Docker ecosystem that I use for local dev and an nginx reverse p

Laravel Sail build failed on M1 mac

I'm trying to build the 'laravel.test' docker image on my new macbook pro with the M1 Pro chip, but I'm getting this error: => ERROR [ 5/12] RUN apt-get upda

How to prevent browser back button after successful login in Laravel?

I am having a problem applying custom middleware for not accessing the login route after successful login. Whenever I logged in a user if the user press the bro

Xdebug:Time-out connecting to debugging client

I am trying to setup xdebug using laravel sail with latest version, on my Ubuntu 20.04.3 LTS desktop, ie php 8.1 laravel 9 with below mentioned details to .env

how to use paginate in laravel

The following retrieves json data from the api and passed it to the loop to list and display the data gathered Controller code: class pagesController extends Co

$ref "#/components/responses/" not found for @OA\Response(response=200)

I am trying to implement openAPI documentation in a Laravel project. I am using darkaonline/l5-swagger package, which is built on top of swagger-php to generate

How to report ModelNotFoundException with stacktrace to Sentry.io in Laravel 6?

I am using below laravel 6 code to report exceptions to Sentry.io: public function report(Exception $exception) { if ($this->shouldReport($exception) &am

Text blur on print laravel invoice package which is based on DOMPDF

Hi I have created a pdf with Laravel invoice package now the pdf showing in the display is fine but when printing that document fonts get blurred anyone please

Memory leak when using Http facade with Laravel Octane

Does anyone have idea why is memory going up for every request when I'm using Http facade with Laravel Octane ? Route::get('test', function () { Http::get('http

Laravel custom validator returns page instead of json

I made a controller to store tasks, it looks like: public function store(StoreTaskRequest $request) { $validated = $request->validated();

How to transfer a variable from 1 function to another in the controller?

It is not possible to transfer data from one controller to another. There is such a controller for filling mp3 files via Dropzone.JS: public function upload(Req

Can't store Files in public folder in Laravel 8

i'm trying to store pdf, txt... in DB but i get this error: Method Illuminate\Validation\Validator::validateCsv,txt,xlx,xls,pdf does not exist. but when i add r

Upgrading laravel into 8 I got illuminate/support support?

I try to upgrade my laravel 8 as I read here https://laravel.com/docs/9.x/upgrade But after I applyid some changes in composer.json I got error : $ composer up

Have error Livewire encountered corrupt data

I'm using extends in Laravel Livewire. It can display, but when I want to add or change data, I got an error. Livewire encountered corrupt data when trying to

laravel create not send data

Basically when i use keycodes::create($data); nothing happens and by nothing i mean nothing gets created Model: use HasFactory; protected $table = 'keycodes';

Laravel 9 dynamic Email configurations

I am coming to you with a problem to which I couldn't find a solution on google after hours of googling. I want to be able to send emails by using different SMT

Illuminate\Contracts\Container\BindingResolutionException - Target class [CommandMakeCommand] does not exist

Using Laravel 8.75 and trying to upgrade to php 8.1 in composer.json to "php": "^8.1" and receive the error of Illuminate\Contracts\Container\BindingResolutionE

Laravel Vue.js API: axios, FormData() is empty

I'm trying to update some data in Model using API in Laravel and Vue.js but I can't do this because FormData() is empty, I'm checking the data from formdata us

Laravel: Feature test json validations unique rule issue

I recently started implementing the unit testing in Laravel 9.x framework. So far, I was able to write some basic rules without any complications. However, in m