Category "laravel"

Laravel - Attribute casting does not cast serialised value to array

I have a model in which I have the following cast: protected $casts = [ 'formatted_criteria' => 'array' ]; It is stored in the database as a seriali

Laravel failing now that I moved to public address

I developed a project using laravel and the php artisan serve. Everything was working as expected. I have since installed apache and have the apache webserver

How to install wordpress in laravel public folder

i also follow this link but this is not my solution - laravel and wordpress on the same domain(laravel in subfolder) i want to add wordpress in my laravel site.

How to pass data to all views in Laravel 5?

I want to have some default data accessible in all views in my Laravel 5 application. I have tried to search for it but only find results for Laravel 4. I have

Why does Cache::lock() return false in Laravel 7?

My framework is Laravel 7 and the Cache driver is Memcached. I want to perform atomic cache get/edit/put. For that I use Cache::lock() but it doesn't seem to wo

Laravel Unknown Column 'updated_at'

I've just started with Laravel and I get the following error: Unknown column 'updated_at' insert into gebruikers (naam, wachtwoord, updated_at, created_a

why is Blade code getting rendered on the page?

I just started learning Laravel, Installed Laravel 7.6.2, and PHP 7.4.4 Without modifying a single line of code in the entire Laravel project, I try to open the

how to create global function that can be accessed from any controller and blade file

I have two controller file homecontroller and backendcontroller. What is the best way to create global function and access it from both files? I found here Ar

Laravel - Browser displays message again when I press back button

Every time I create a new category in my application, it displays a message of success. Here is my code: return redirect('dashboard/categorias')->with('mess

How to run multiple Laravel projects at same time?

To run one laravel project we only need to type "php artisan serve". and it will be available on port 8000. But sometimes we need to run multiple projects at t

Laravel dosen't connect with Oracle

I'm using yajra/laravel-oci8 for Oracle connection with laravel. But I couldn't connected to Oracle, from my client PC to Server. showing this error: I'm u

Laravel Echo + Laravel Passport auth in private / presence websockets channels

I'm trying to connect to a presence wesocket channel using Laravel Echo. I'm also using Laravel Passport. I followed lots of tutorials, but I'm getting 403 erro

How to access Sanctum package in custom laravel package

i want to access laravel sanctum auth which is working fine in project routes I'm making a custom package of api's which needs to use same sanctum authenticatio

Can't run Node.js server local

I can't npm run watch I don't know the problem

Laravel actingAs guest

Laravel provides a way to authenticate a given user during HTTP testing with $this->actingAs($user); Is there a way to unauthenticate that $user within t

Make survey at laravel 5.4 and MySQL

I need to make a survey for my website. I have this: Route: Route::resource('survey','surveyController'); Controller: public function index() { $show=surve

There is no role named `admin`. laravel

i use this package : https://github.com/spatie/laravel-permission/tree/v2 code : $user=User::find(2); $user->assignRole('admin'); and when

Always have to clear cache in .env?

I am having a cache issue. I have a project and worked on local. Now whenever i upload to server and edit the .env and config/app.php file. It is not taking the

Log a user out of a website when they put their computer to sleep

This is a bizarre one. We have a Laravel website, and on said site we have a timer per user, where they get 15 minutes of being inactive before being booted. W

preventing abuse of API service usage

I am planning on using Laravel in my next web project, for the backend. Using the Laravel's built-in functionality I will build an API service. So my main conce