Call model in API server but return db from client

I have 2 website, one is api server, one is client. On server i have simple code, example: DB::table('table_name')->get(). When i call request f...
00

Docker series

We have already reviewed vagrant for several times, I get hearing about docker and kubernetes. I would like to ask for a series for using docker an...
46

Why is it bad idea to use Request::isJson instead of API route?

Hi, Can someone explain to me in a nutshell why I should not be doing this in my existing laravel app? I want to add json responses t...
04

How to make validation rules to upload pdf, doc and docx files in laravel 5.4

How to make validation rules to upload pdf, doc and docx files in laravel 5.4 Tried: 'fileUpload' => 'required|mimes:jpeg,png,jpg,doc,doc...
02

Turning my Laravel app into a GraphQL endpoint

Hi Jeff, it would be awesome if you can help us with a series on how to turn a Laravel app into a GraphQL endpoint. I am sure a lot of peopl...
31

Filename not storing correctly in the database

I'm trying to upload a file but the file name doesn't save correctly in the database instead of getting something like '1500677031.jpeg' stored in...
10

Catching PDO Exception

Any proper way to catch PDO exceptions? If database server fails and laravel cant connect to it. Anyway I can display a custom page like error 500...
05

Browser back button counts as Ajax request?

I have an index page that does something different if it's loaded over AJAX or not. If I navigate away from this page and then hit back, it...
02

How to Hash user input password when using Form Validation in Form Request( Laravel 5)

In my Controller class public function postAccountCreate(postRequest $request, User $user) { $user->create($request-...
09

PATCH requests with 'form-data' parameters are not recognized

Working on a restful API and I'm stuck on this weird issue when trying to update a user. The resource controller is defined as follows:...
05

Custom request response

Hi, I am doing a petition to an Api from another website, both done with laravel, my intention is to create an object in the second website...
04

How about a specific series about ("complex") forms?

It seems that there is no series of lessons around the creation and treatment of (especially "complex") forms with Laravel For exa...
04

Generate route from a boostrap modal

Hi, I hope everyone is doing good, I'm having this issue, I'm making a product-page and I would like to generate a modal for each product and at t...
04

REST - Restoring soft-deleted model, POST, PATCH or PUT?

I have few models that uses soft-deleting, what is the best http method for restoring a soft deleted resource? on non-soft-delete mode...
03

putFile method stores mp3 files as .bin in laravel

I want user could upload audio files to server for that I wrote this : public function sendAudio (SendAudioFormRequest $request) { i...
03

Save array retrieved from a table form

Hi I have a form with multiple rows of table and array of name: <form action="/test" method="post"> {{...
08

When to add a leading or trailing slash when defining route?

This looks very trivial, but is there any rule on when to add a leading or trailing slash while defining routes? I often get confused whethe...
03

Guzzle http post request not working.

let say I have two route with this two method on my controller. //...
09

Array validation: retrieve id of current record for except rule

I am facing a situation where I have to validate an array of records and have to check if one of their fields is unique (specifically, the co...
02

PUT won't work, but POST does instead

I trying to update records in my table, and following the laravel's documentation I learned that such a request should be a PUT reques...
04