Category "laravel"

Querying only one row from a one to many relationship laravel

I have a products table and a product_pictures table, where a single product can have many pictures (one to many relationship). I am trying to display all of th

How to convert binary string to normal string in php

Description of the problem I am trying to import email content into a database table. Sometimes, I get an SQL error while inserting a message. I found that it f

Querying only one row from a one to many relationship laravel

I have a products table and a product_pictures table, where a single product can have many pictures (one to many relationship). I am trying to display all of th

Display Link Title Instead of URL in XSL

I'm learning XSL-as-I-Go, but I'm stuck. My function : public function SitemapHTML() { $xp = new XsltProcessor(); $xsl = new DomDoc

Laravel 5 controller sending JSON integer as string

On my development server the JSON response from the Laravel 5 controller shows the data in the correct types. e.g imdb_rating: 7.6 imdb_votes: 6271 But on t

Create tags in laravel post publishing

Currently when I want to add tags in my posts I have to go to my tags page and create them then go to my post create page and add them to my post by multiple in

How to use Tailwind CSS together with SCSS in Laravel/Vue project?

I'm trying to install tailwind css from this guide into an existing laravel/vue project, which uses scss. install packages yarn add -D tailwindcss@latest postcs

Laravel 5 session not persisting after user is logged in

I'm having an interesting issue with Laravel 5. After logging in a user, the logged in status is not persisted across pages. Clearly it has something to do wit

Decode integrity token using Google PlayIntegrity API

I am trying to implement PlayIntegrity API to my Android app, but I don't know how to decrypt and verify the token using Google's servers. I followed the docume

How to return database table name in Laravel

Is there a way that I can get the current database table in use by the model that I'm in? I see that there is a table() function in Laravel/Database/Eloquent/mo

Convert date and time to Jalali in Laravel

I want to change the time and date calendar to Jalali (Shamsi calendar used in Iran) in my system. How can I do this? "language_title" => "English",

Convert date and time to Jalali in Laravel

I want to change the time and date calendar to Jalali (Shamsi calendar used in Iran) in my system. How can I do this? "language_title" => "English",

Laravel 5.5 change unauthenticated login redirect url

In Laravel < 5.5 I could change this file app/Exceptions/Handler to change the unauthenticated user redirect url: protected function unauthenticated($reques

Override default Auth routes in Laravel 7

I need to custom routes of Auth::routes();, I can not find them, try search in Router.php Vendor\laravel\framework\src\Illuminate\Routing\Router.php But I

Laravel Blade html image

My image file path is public/img/stuvi-logo.png and my app.blade.php file path is resources/views/app.blade.php Inside of my app.blade.php file I use {{HTML::im

Laravel Jetstream livewire - Profile photo is not being uploaded on s3

I have checked everything in AWS S3, permissions, policy bucket name, all looks okay. I have updated the config in the jetstream config file config\jetstream.ph

After Login/Signup, Laravel returns "419 PAGE EXPIRED."

After migrating Laravel project Domain (.in to .institute) & Hosting (namecheap to name.com), everything works fine. But when I tried to Login or Signup, re

Laravel 5.4 ‘cross-env’ Is Not Recognized as an Internal or External Command

I'm trying to run npm run dev for Laravel Mix and I get this error: > @ dev D:\projects\ptcs > cross-env NODE_ENV=development webpack --progress --hide-m

Authenticate my ReactJS SPA with laravel/sanctum using Axios

After a successful authentication (login + token), I'm still unable to request auth:sanctum routes and I get the following response: Docs ... This token shoul

Is it possible to temporarily disable event in Laravel?

I have the following code in 'saved' model event: Session::flash('info', 'Data has been saved.')` so everytime the model is saved I can have a flash message