Category "laravel"

How to add OR for adding multiple gate permissions at construct method of controller

I'm working with Laravel 5.8 and I have created this method in the Controller: public function __construct() { $this->middleware('can:see-brand-r

Is it possible to rename Teams in Laravel Jetstream?

In the old Laravel Spark (now Spark Classic) you could utilise a configuration method Spark::prefixTeamsAs('bands'); a new project I'm working on uses the new L

Bind JSON attribute with livewire

I have a Test model, with the JSON attribute inputs, which is a flat array of strings (e.g. ['foo', 'bar', 'baz']). I'm trying to bind this field up to Livewire

ReactJS app inside Laravel's public folder .htaccess configurations

I am hosting a React application inside the public directory of a Laravel app where: /public_html/ app bootstrap config

Laravel - Method Illuminate\\Support\\Collection::makeHidden does not exist

I want to hide the columns password & OTP ,that is included in $uses result. Actually these 2 columns are part of the users table. I've tried like below. B

Laravel pass view field input data to controller and then return calculated value in disabled field

So what i want to do is take values from user input, then do some calculation with it inside the controller with method and that method return value to be displ

JS Fetch Single Record From Laravel Controller

I work in laravel and trying to get the response from the page. This is the controller in question: public function counter($id) { $toSearch = $id * 10000;

Save adminlte customization state

I am using AdminLte. You can customize web for yourself(dark mode, nav compact, ...).docs But when I go to another page all customized state removes. How to sav

Setting up Laravel Octane using RoadRunner on a Production Server

I've installed the Laravel Octane RoadRunner Application Server. It works flawlessly on my local Linux server, and I can access the application via 127.0.0.1:80

Why does Laravel say that my "update" method is not a support route?

I am getting this error when I try to use update method from my routes. The UPDATE method is not supported for this route. Supported methods: GET, HEAD, POST, D

Search in a non-existing table - relationship

I try to make hasMany relationship in Laravel and I have this problem. If I rename table name in Model to test, relationship works fine, seraching by my new tab

How to Get Value From Trumbowyg Textarea on Livewire

I created textarea form element using Livewire, I use Trumbowyg to make WYSIWYG. After sending data trhough submit on livewire, I coundn't get data from textare

Why new laravel 9 project with github shows "git: 'auth' is not a git command. See 'git --help'"?

I created a new project with laravel new testproj --github, in order to create a repository in github, but it keeps saying git: 'auth' is not a git command. See

Is there a way of formatting failed output from Laravel's assertSee() test?

Laravel has several built-in assertions that allow you to query the Response from a Request. public function testWebpage() { $response = $this-&

how to send error emails to the developer in laravel 8 App

I am using laravel "laravel/framework": "^8.75" version. When deployed the app turn APP_DEBUG=false but users get errors but they can not know what is wrong and

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

Laravel sanctum vue spa being blocked when using ip address

I know a lot has been documented on about laravel sanctum configuration to avoid blocked requests from your spa frontend, but something that is not quite clear

Laravel 9 on PHP 8.1 slow responses - out of the box

I am using out of the box Laravel 9 / php 8.1 combo and loading initial page for 190ms sounds horrible. Last project I built used laravel7 and the response time

Transition a div height when the content is updated by livewire

So we got a div with a Livewire component to choose languages : <div> @livewire('multiple-languages', [ ... ]) </div> When the user selects a l

php Keeping only 1 date occurence in multi-dimensional array

I have this array with certain brand_ids, within these brands I have an array of dates in which a sale occured but these are based on the products in sale so th