[NPM3] Windows users, solution to all your problems!

Oh wow. I just installed [email protected] This is awesome. My node_modules folder now contains 582 folders, instead of 4, with thousands of nested, nested,...

Cache tags removed in L5 ?

It seems like Cache tags no longer exist in laravel 5.1. I'm looking for something that can provide similar functionality. If there isn't something like that available, I...
Laravel
6
101

One to One firstOrCreate

Hi, is there a Way to make something like firstOrCreate in an One to One Relationship? So I will at least get an Model with its default values instead of nothing?...

403 Error when Doing Form Requests

I has face 403 problem when i am trying to insert the data into database. Please suggest any advice to fix this issue thank you. Here is my food controller code:...

Flash message when validation fails (using FormRequests)

I'm wondering if (and how) I can show a general flash message (eg. Hey please check the errors below) when form validation fails. In L4 or using the validator trait...
General
8
162

How can i use oauth-2 on every request with no postman

I am using oauth-2 and the problem is that i don't need need to use postman for accessing my api which lead to impossible using browser like myapi/v1/users/create how can i...

Showing image from disk storage im image html tag

This is how to retrive a file from disk $contents = Storage::get('file.jpg'); and my question is how to add this image retrieved from disk into html tag and so on. thank yo...
Laravel
10
62

Design problem with accessor and mutators

Hello everyone, I'm using accessors to change the value when the same is filled in the form. Example: public function getValueAttribute() {...

Facebook Canvas with socialite

Im developing a facebook canvas app and i need to authorize the user with facebook and get user data. Im using socialite, but im getting problems with canvas... when redire...

Managing Mass User Settings - Part 2

@JeffreyWay You often said that we will use Auth::user() in real life but, it turns out that I need to give an administrator the opportunity to e...

Debugging Requests

I have the whole standard Auth process working using the out of the box stuff and wanted to move the login/password to a bootstrap drop-down. Having transplated the exact s...
Laravel
5
420

Onboarding with email only

Out of the box, the authentication in Laravel is awesome, and exactly what I need. But I want to make the signup process for the user a bit smoother. Is there a way to 1) k...

Injecting services into Eloquent model

Hello, I need to inject some classes for example Translator into Eloquent models. Is it possible to inject any services to model? I know about DI workflow used in La...

Post Request clicking a link

Hello, I would like to generate a POST request to a route when clicking a link.. I would also like to pass a parameter which is relative to that link.. Is the...

Button acting as a submit input?

I have a form to delete a user and I want to attach a confirmation sweet alert modal before submitting the form. This is my form: <fo...
Laravel
3
118

SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint

I have an error: SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (SQL: alter table teachers add constraint teachers_city_id_forei...

How to auto update a field in the table when current date is more than a specific date in the table.

I am doing a project where my website showcase event information and the date duration like example 5sep to 8sep. However i want to auto update a field in my event table wh...
Laravel
3
133

Redirect to different route for different types of user

I have a application i which there are three types of users, admin hod and student. In mu users table there is field called user_type which can be admin,hod or student. Now...

Limit on String length?

I am trying to seed some pages for a website. The content for one of them pages is 10000 characters long with tags and it gets truncated, it's going in to a TEXT field type...

Understanding PHP Configuration Files in Linux/Ubuntu

I am trying to add xdebug in my local machine, i stumbled upon these 3 "config locations": ➜ ~ ls /etc/php5 cli fpm mods-availa...
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