Laravel 5.6 - How to authenticate API using sessions for same folder SPA?

I have a React SPA in the same Laravel project. The login/signup/logout and all other js views are in the js folder and use axios api calls for all POST/GET re...

How to auth my Laravel API for my IOS app

Hi , i have to develop the backend of an IOS app and i'm concerned about some stuff : To use my app you have to be logged in (create an account) I want to kno...

How to write code in laracast?

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

Can't change app default language

After a lot of struggling I coudln't change app's default language. What I have done: change locale attribute in config/app.php to: 'locale' => 'ar',...

Homestead 502 bad gateway for php 7.3 web app - works with 7.2

Hi all, I just finished installing Homestead on a brand new laptop. All working well to this point. I git cloned my project (which I have been building on my desktop...

Service Layer in laravel

Is it good idea to have a service layer in the application which holds the business logic, so that the controller work is to get the user data and return the response from...

How to display section in a page template

I using a laravel template, I want to display a section in the homepage how do I acheive that?...

Flox - Self Hosted Movies, Series and Animes Watch List

Hey all! I created an simple self hosted movies, series and animes watch list. It's build on top of Laravel and Vue.js 2.0 :) GitHub:...

Typical method for automating domain/website?

Hi, With a bespoke Laravel PHP website maker, on a linux PHP server with mysql - lets say each customer has their own domain. When I go to create the new account, I'...

Link to current url but change 1 param

I have the locale of my app as a url parameter. Route::prefix('{locale?}')->group(function () { Route::get('/', '[email protected]...

Trying to make a Recipe app, including Beer

Hey, great minds of the interwebs!   I'm kinda new to Laravel and looking to learn. I am trying to make a Recipe app in Laravel, that will contain both beer and mea...

Add devExpress to Laravel project

Hello, I have a Laravel 5.7 project and I would like to use devExpress JavaScript plugins. Does anyone know if there is more steps in the installtion then the npm in...

jQuery not loading or Vue doesn't load depending on....

If I have this <script src="{{ mix('js/oneui.app.js') }}"></script> !-- Laravel JS --> <script src="{{ mix('js/laravel.app....

My first Big App - Controller Issue

Hi, I'm new to Laravel and loving it. I'm on my way to create my first big app for a laboratory. I'm in the plan stage and have this issue. I have planned several ta...

Weird 'Function name must be a string' with auth:api

Passport is installed. CreateFreshApiToken is on the web middleware auth.php API driver is changed to passport All passport routes are ther...

Sublime Text 3 Package Control Server Offline

Everytime I try to install a new package I get "There are no packages available for installation" When I check in the cons...

Where do I set a BASE_URL with a controller?

Hey all, I'm using the PHP Practitioner series to build a website for a family website, I finished the website on my machine and loaded it onto a live server, and now none...

Have a service available in a class

Lets say we have a base class Chart (not a model) and Triangle , Bar, Pie that extend Line In a controller i inject a service timeInterval which is used by the cont...

ralouphie/getallheaders redeclare problem

We were having a stable environment with laravel 5.6.28. We ran composer update and all out of a sudden we are getting redeclaration error from this package....

Better way to add optional array key?

I find myself writing code like this from time to time and always feel there must be a cleaner way of writing it. Any suggestions? $data = [ 'ticket_id'...
Create a New Discussion Button
Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels