I am working on a Laravel project and am trying to get GET parameters from a controller. Requesting a page with ?date={value} should return value as follows: public function getIndex(Request $request)…
Tag: laravel
ServiceProvider not found Laravel 5.0
I’m trying to create a custom package for Laravel 5.0 based on this tutorials The folder structure and service providers are exactly same, but some how the Serviceprovider is not updating autoload_namespace.php. I already added my service provider in app/config.php In my root composer.json I have following code. Under my packages folder files struture is as follows. I can’t use
Laravel Homestead Swift Cannot send message without a sender address
I get this error with stock email settings in Laravel 5.1 Homestead when I try to send a password reset mail. Swift_TransportException in AbstractSmtpTransport.php line 162:Cannot send message …
Passing multiple parameters to controller in Laravel 5
In my application, a user has the ability to remind another user about an event invitation. To do that, I need to pass both the IDs of the event, and of the user to be invited. In my route file, I have: In my view, I have: In my controller, I have: However, when I hit that route, I receive
Laravel 5 add nusoap
I am unable to install nusoap to my existing laravel 5 application. Ive done the following: Created a new Folder in App/Http/Controllers/ – namend “Soap” – and copied the libary into it. use …
Laravel 5.1 – how to download pdf file from S3 bucket
I am using Laravel’s Storage facade and I am able to upload the pdf to S3 and I am also able to get() its contents but I cannot display or download it to the end user as an actual pdf file. It just …
Laravel Homestead Redis Port Forwarding
I’m having some trouble here trying to remotely connect to my local Homestead Redis server. I’m using both commandline (redis-cli) and RDM. I’m able to connect with Postgresql with PgAdmin in this …
Getting error when sending an email in Laravel 4.2
I have an error in Laravel when I am sending an email. I have a form with a select tag and when I select the user and click submit I need to send him a mail after I select it. Here is my …
Laravel Socialite: InvalidStateException
I’m using Laravel Socialite to add a Facebook connect button on a website. Sometimes, I’ve got this error on callback: exception ‘LaravelSocialiteTwoInvalidStateException’ in /example/vendor/…
Laravel 4.2: Convert a SQL select statement to Eloquent statement
I have the following DB::select statement: Which its result will be something like: what is the equivalent statement using the Eloquent model? This is what I have so far: Answer You can use this: You need to use DB::raw when using count in your query’s select, because otherwise it will get quoted by PDO.