Skip to content

Tag: laravel

Laravel 8 job Cannot pass parameter 1 by reference error

I’m working with a Laravel 8 project and have created a Job that gets processed. I’ve got several functions to extract functionality but am getting the following error: Cannot pass parameter 1 by reference The trace is initially saying on line 65, which would be ‘title’ => $page-&gt…

Laravel SEO friendly URLs

I started learning laravel and couldn’t figure out how to solve a problem. For example if i want to create a route for products i can use a route like below. In this approach we would get something like this localhost/product/macbook-pro. However i want to create a url like localhost/macbook-pro. In my …

Can’t get Session in controller

I want to alert notify after sent message! I try to get session message after sent in controller but it not working. here my controller code : Answer Use the helpers: for inserting and making seesion : for catch and using the session :

How to sort numbers containing current year in prefix

I am having trouble sorting the job numbers in my project. My client requirement is to store the job numbers in the below format:- For example:- The current year is 2021 so the job number will be like this:- When the year changes it should start again from 1 and so on for the next year. For example:- I had