Category "laravel-8"

Using Carbon diffForHumans in my model in laravel 8

I am using laravel 8 framework as my backend for my android application and I want to output time the same way instagram shows time but each time I use carbon d

Laravel Sanctum throws 401 Unauthenticated when using Postman

I have problem with Laravel Sanctum. My dev environment is located in subdomain. All my API routes are prefixed with /api. Here are my settings: .env APP_URL=ht

Getting msg as "cmdlet Invoke-WebRequest at command pipeline position 1 Supply values for the following parameters: Uri:" when installing laravel

Getting msg as "cmdlet Invoke-WebRequest at command pipeline position 1 Supply values for the following parameters: Uri:" when installing Laravel with docker. I

How to generate QR CODE for dynamic generating link and logo using Simple QrCode in laravel?

I want to generate 'Image inside QR CODE' with dynamic url and Image. I have mentioned the below error and code. Used the https://www.simplesoftware.io/#/docs/s

How to change 'users' auth table and use another instead Laravel

So I just started a Laravel Project with Breeze, and I wanted to change the default table users , the problem is it didn't work, I did my research for days and

run function in every login in laravel fortify

I am using Laravel 8 with Fortify. I saved user's emails and passwords into the database and I'm not going to use registration. Every time users log in, I need

Laravel reuse session on subdomain

Let's say, I created 2 server and 4 sub domains. example.com and first.example.com route to first server. second.example.com and third.example.com route to seco

How to properly start Laravel 8 with Bootstrap & authentication

I face the following image every time I want to start a new Laravel 8 project with authentication routes set up using the laravel/ui package and Bootstrap scaff

How to properly start Laravel 8 with Bootstrap & authentication

I face the following image every time I want to start a new Laravel 8 project with authentication routes set up using the laravel/ui package and Bootstrap scaff

how to use whereHas in laravel

I am new to laravel, I need to create a query for the db, $query = Deal::query(); I want to use the wherehas operator. this is my code that is worked. else if

Laravel 8 - problem with scss and npm run dev

Tried node versions: 12.20.1, 14.15.4, 15.6.0 When trying to compile the scss file I always get this error: npm run dev > @ dev /var/www/projects/eight >

Pikaday DD/MM/YYYY format opening as MM/DD/YYYY

I have a blade component with the following alpine code <div x-data="{ value: @entangle($attributes->wire('model')), picker: undefined }" x-init="new Pika

The Mix manifest does not exist - Laravel Fortify Jetstream Login/Registration Issue when deploying laravel in Hostgator shared hosting

I have been able to deploy Laravel projects successfuly in the past. For the first time I am using Laravel 8 with Jetstream and Livewire. Laravel is now using F

Laravel. Json column with cast as array are returning as a string when using JOIN in query

Laravel 8. I have two tables(models) 'employees' and 'positions'. In a model 'employees' I have a casts: protected $casts = [ 'academic_post' => 'array'

yield inside section in Laravel 8

I am trying to yield a section inside another section which is itself yielded in master.blade.php, but it does not work. master.blade.php <!DOCTYPE html>

Morph field doesn't have a default value when seeding factory relationship

I have a Recipe and Review model: class Recipe extends Model { use HasFactory; protected $guarded = ['id']; public function reviews(): MorphToMany

Laravel Blade component method not rendering in cpanel-server but work in my localhost

I have a component RemoveBook in app/View/Components/RemoveBook and the blade component in resources/views/components/sections/parts/remove-book.blade.php. all

Laravel 8 factory state afterCreating

Laravel 7 factories had method afterCreatingState() where you could define what should happen after Model with specific state was saved into database. $factory-

Target class controller does not exist - Laravel 8

Here is my controller: <?php namespace App\Http\Controllers\Api; use App\Http\Controllers\Controller; use Illuminate\Http\Request; class RegisterControlle

Customizing Laravel validation JSON message format - Laravel

I'm trying to figure out how to customize the Form requests to validate By default Laravel gives a good enough JSON format for validation errors but what if we