Support the ongoing development of Laravel.io →

388 Threads

@inject method throws error on live server

I am developing a laravel 5 app. In my code I inject a class that I created in App/Utilities/class.p...

0 Likes
1 Replies

View Composer not accepting string variable in view->with method

Hello, I am really stumped by this one issue... I have the following code in my custom view composer...

0 Likes
1 Replies
posted 8 years ago

How to set different binding in a testing environment

Hi, I am trying to see how to best approach to bind a mock dependency when testing. Assume I have a...

0 Likes
1 Replies

Laravel 4 DI Issue

Trying to get some dependency injection going here but I keep getting the following error: ErrorExce...

0 Likes
0 Replies

How to create a custom Flash Notifications service

Hello! I'd like to create something that allows me to save messages in the default flash session sto...

0 Likes
2 Replies
posted 8 years ago

mocking an IoC Container binding in codeception+mockery functional test

So I need to mock some Stripe API calls for a bunch of functional tests. I'm binding the mocks via...

0 Likes
1 Replies
posted 8 years ago

Singleton constructor being called twice?

I'm just getting my head round this whole DI thing, but something seems to be happening that I wonde...

0 Likes
2 Replies
posted 8 years ago

Laravel 4.2 app binding

Hello, I have a question about application binding, here is example from the documentation. App::bin...

0 Likes
0 Replies

How to get HTTP request in route model binding closure

Hi there, I am trying to get access to the HTTP request in my route model binding closure. This is b...

0 Likes
2 Replies
Solved

Overridden core class does not work when in artisan

In a fresh Laravel build, I cannot get overridden IoC bindings to work everywhere in the application...

0 Likes
1 Replies
Solved

Relationship cant access recently created model

Hello, I have this scenario: Route::group([ 'middleware' => ['reservation'], 'prefix' =&g...

0 Likes
1 Replies
Solved

Is there a way to automatically populate an object with Request data in a Controller method?

I'll try to keep this as short as possible. Basically I want to be able to do this: Let's say I have...

0 Likes
0 Replies

[L5.1] create facades using packages

I want to create a facades file in package and register it for app. i am looking for tutorial link P...

0 Likes
3 Replies

Multiple routes

Hello all, I have an application, called Hummingbird, inside /app/ and is initialised with all route...

0 Likes
0 Replies

Laravel 5.1 Session Syntax and Usage

According to the 5.1 docs, the new recommended way to work with session data is to inject the reques...

0 Likes
0 Replies
posted 8 years ago

How can I register a singleton with dependency injection?

I am fairly new to Laravel. Maybe it is possible somehow but I could not find it. This does not work...

0 Likes
0 Replies

Extend Response::json in L5

I am adding something additionally in Response::json. For example, the Restful route to public funct...

0 Likes
3 Replies
posted 8 years ago

Dependency Injection giving me InvalidArgumentException The HTTP status code "-1" is not valid.

I have set up a repository interface and a repository class namespace Repository\Findbrok\Contracts;...

0 Likes
1 Replies
Solved

Loading plain PHP class into Laravel 5.1

I have a plain PHP class written like this class UploadHandler { protected $error_messages = arr...

0 Likes
4 Replies

[L5.1] Convert Codeigniter library and helper to laravel's packages style

Hello, i am new to laravel, i want to convert ci library into laravel package style and access it i...

0 Likes
0 Replies

Thanks to our community

Solutions given in the past year. Excluding solutions from thread authors.

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.