Refactor store() method when handling more than one entities while saving data

I need to save data from Request. It contains some stuff, which belongs to two different models. E. g. I have Image model...
04

Cannot Update my data from my edit from

This is my edit form <form class="col-md-6" method="PUT" action="/posts"...
38

Return type for API requests

What's good practice for controller return types for routes/apicontrollers. The vast majority of my API routes return some type...
04

How to write code in laracast?

I want to write code that cleanly. So nice views. How can I do that?...
28

Do I have to handle all API errors only in one class?

I have two "types" of API GET requests for now. Both are built with query parameters. 1st "type" has some pre-defined query par...
01

Workaround with Laravel FormRequest rules

I have next api logic: validate request -> fetch data -> transform data -> reutrn data. I use...
03

usort is a PHP function with spooky behavior ?

As far as the php docs are concerned in the method The comparison function must r...
06

Schedule not working as I expect

Hi all Schedule is not working as I expect. I have it woking with this line of code. '$schedule->command('email:newsoffers')->e...
01

This is anxiety-provoking

I need help cleaning up this one. Is there some way where I can declare an empty variable? $alternative = '';...
03

Refactoring

When I'm refactoring code that I wrote a while ago, one of the things that sometimes prevents me from changing anything is not being sure exactly w...
02

API design - how to improve?

Hello, guys, it's me again. Trying not to waste your time. A lot of text below. Maybe better to stop reading right here to avoid catching headache....
03

How can I optimize this code? LARAVEL 5.6

Before I let the user fill a form I must verify a few things. I did a very simple verification but it doesn't seem quite right to me. I feel like t...
02

Can't get JQuery lightSlider to work with JQuery imageGallery

Hi, I've managed to get JQuery imageGallery to work by following the docs, but when I try to integrate JQuery lightSlider with it, it doesn't work....
04

escapeshellcmd() has been disabled for security reasons

how to solve this error escapeshellcmd() has been disabled for security reasons...
04

DB

Hello @if(count($konta)) @foreach($konta as $konto)...
02

Vue ajax file upload

Hi. I am trying to upload a file using vue.js, The code below works as it's supposed to, but I am wondering if I am missing something else....
02

Repository Pattern

Hi all, I just wanted to check I was on the right lines with this. It feels neat to me, but I've not used Laravel for a while and am just ge...
03

Running out of memory

Hi all I am working on a membership site that, in time, will have several 100k members that we need to send emails to. Currently there are a...
06

Auth

Hello I use standard Laravel Auth, make 3 different users let's say its: Abb, Abc and Abd When they login to Admin panel they can add...
02

problem of recovering a multiple select

or a long time I try to solve my problem without success. I would like to specify that I am a beginner in laravel here is my html code...
02