Category "laravel"

How to call ajax function on buttonclick in laravel?

View Code: <script> function getMessage(){ $.ajax({ type:'POST', url:'/getmsg', data:'_token = <?php echo

Define the selected option with the old input in Laravel / Blade

I have this code: <select required="required" class="form-control" name="title"> <option></option> @foreach ($titles as $key => $v

Laravel Carbon throws error The format separator does not match

I'm, trying to format a date into (Dayname Date Month) and I'm using Carbon for this but it return an error Carbon The format separator does not match here is a

Laravel, get relation row instead of id

I want to get author row instead of author_id. I could this with add collection and change one by one but has Laravel any function for this? Well, I want make t

Accessors (Getter) & Mutators (Setter) On a Pivot Table in Laravel

I have a pivot table that connects users to workspaces. On the pivot table, I also have a column for role, which defines the users role for that workspace. Can

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