lavina lavina

Eloquent model selection

Hello, i have relationships between my models setup this way: User: public function section() { return $this->belongsToMany('App\Models\Se...

UnitTests how to get ID of created model or wipe DB each test?

So my current issue is that I hardcode the ID $response = $this->post(route(''), $attributes); $response->assertRedirect(route('admin....
mostafalaravel mostafalaravel

How to call a controller method from another method in the same controller with different request params

Hello , I have two methods index()and exportExcel() in competenceController as you can see bellow : public...
hasen39 hasen39

composer update error

hi laracast's. when i run composer update i get this error In RemoteFilesystem.php line 398:...
snipesnipes snipesnipes

mysql strict mode to false

Is it ok I mean do u guys disable the mysql strict mode to false ? or should I find a way to make those group by queries work anyhow ? what do you do and if I should keep t...
fkwok fkwok

Envoyer didn't really restart forge managed queue workers

Hi, While I am using Envoyer for my project deployment and have Forge to management my servers e.g. creating new workers for the queues. Before I move to Envo...
Cruorzy Cruorzy

NGINX multiple level auth_basic authentication

Looking for a way to set a global auth_basic authentication. But when somebody knows one for a specific site then they should be able to connect. Is this possible at...
garbott garbott

Multiple subscriptions for single user

Hello, I've got my website up and running with multiple subscriptions per user, different tiered services for different account items, however, I've just noticed tha...
jooorooo jooorooo

Error with Eloquent query builder 5.7

When i make query at this type: $record = Product::selectRaw('id < ?', [552]) ->where('id', 0) ->select('id');...
brayniverse brayniverse

Where are you all from?

I'm wondering how far Laravel's reach extends to. I hail from London myself....
randomphp randomphp

Laravel doesn't work on production server

Hi, This might be a stupid question. I have made a Laravel Application on localhost (Which works) And wanted to move the project to the live server, since it...
bsienn bsienn

Homestead server times out when route not found

Accessing any invalid/non existing route on fresh laravel app returns halts & timeout after 60 seconds. Error: The process "git status -s" exceeded the...
GiacomoM GiacomoM

Blade: check if old values are empty or not

Hi, as the subject, I need to know if the old values are empty or not, in blade. I mean, I need to know if we are coming back from a post or we are in the first page reques...
mrcsmcln mrcsmcln

Laravel Valet not playing nice with BrowserSync

The title pretty much says it all. I've configured my valet park'd my ~/Sites directory and tried using mix.browserSync({proxy: ''})...
UsmanBasharal UsmanBasharal

Sending FormData() with axios in VueJS API returns name null

I am trying to upload a pdf file and save its name into the database, but, it just inserts the pdf file url. I mean the pdf file is good, but nothing is in the name column....
UsmanBasharal UsmanBasharal

Uploading pdf file in laravel vuejs Axios

I have created a project for bookshop and in the section of employee information I want to upload a PDF file using code given give me the below error.I have been t...
splendidkeen splendidkeen

Authentication issue on broadcast channel

Within User.php I have a friends() relationship: public function friends(){ return $this->belongsToMany(User::class, 'friend...
mmaged mmaged

npm not render app.js

I have npm installed npm install And run npm watch npm run watch Thre result DONE Compiled...
gagboy717 gagboy717

owl-carusel not working?

@foreach($posts as $post) <div class="item"> <div class="card">...
mmaged mmaged

User Factory

Why it is neccessry to put User factory inside function and return the id?! $factory->define(Wallet::class, function (Faker $faker) { return [...
Mozafar Mozafar

Same query different result

I have two queries which one of theme returns record and the other returns null: // returns null $result = DB::connection('pub')->table('clients')->whe...
besoinre besoinre

Hosted Laravel application doesn't fully display pages

I just hosted my Laravel application that worked perfectly locally. Now, some pages of my site don't load all the elements (mainly scripts). Moreover, sections are not alwa...
SupunSam SupunSam

How to filter retrieved data from relational tables

Hi All, I am retrieving data from a relational data table from the database as follows: $job_records = JobRecord::with('job:job_id,status,mfg_site,tot...
muazzamazaz muazzamazaz

Date format issue

I am using following code to change date format for saving it into database gotton in Json string $input = $sensors_data["date"].' '.$sensors_data[...
Khalid_Hussain Khalid_Hussain

Pass data on section not at the page

i transfer some form data one section to another section. not a page my page are two section one on form and other is empty so when in put the data in input field then same...

Fetching Data - Best Practice (Laravel/Vuex)

I've just implemented rue-router and vuex into an App I'm working on. I thought everything was going along quite nicely until I implemented a loader (spinner) and discovere...
uksarkar uksarkar

How to generate unique serial number in factory

I have a factory like this : use App\Model\Reservation; use App\Model\User; use Carbon\Carbon; use Faker\Generator as Faker; $autoUUID = uuid(); $factory-&...
damcclean damcclean

Is it possible to trigger a password reset manually?

Hi there, Just wondering if it's possible to trigger a password reset email and link to a user. I'm creating an app where users are created via an artisan com...
SinghWithLaravel SinghWithLaravel

Change Date timezone in Laravel project while fetching date.

I want to change the datetime while fetching data from database. I could do that through accessors in laravel, but it will just affect the current model. How can i apply it...
ajithlal ajithlal

corcel not working on server

I'm using jgrossi's corcel package to integrate my WordPress site to laravel. It works fine on my system and it returning 500...
TzuSun67 TzuSun67

Defining a comments field to a specific user

Hi All, I know this may be a very easy thing to achieve but I have been struggling to to assign edit functions to comments that users have created. I.e. if th...
AntLusher AntLusher

Lara Nova

Good morning all! Please could you help with the following: I have a JSON field called name with keys as follows: first, last, title. On the index page...
musa11971 musa11971

Exception thrown when trying to use database notifications

I am facing a strange issue where an exception is thrown when I try to use database notifications. More is explained below. Here is my basic set-up: App\User:...
chris-lw chris-lw

To Queue or Not To Queue

I am just digging into Queues. It is my understanding that Queues should be used for background tasks because they are non-blocking. I have an action that can take...
IsaacBen IsaacBen

Keep inputs after failed validation

If form validation fails then I have to fill all the fields all over again. Is there a way to keep inputs filled and just fix the error?...
Create a New Discussion Button