Questions tagged [laravel-4]

Laravel 4.2 is the previous version of the open-source PHP web development MVC framework created by Taylor Otwell. Laravel helps you create applications using simple, expressive syntax.

Laravel 4.2 is the previous version of the open-source for web development created by Taylor Otwell. Laravel helps you create applications using simple, expressive syntax.

New Features Overview

  • All pieces have been decoupled into independent components, collectively called Illuminate
  • integration
  • Driver-based view system
  • Better integration with cloud storage
  • collections

Resources

See also the tag for general laravel based questions, from past versions.

Social Media

14441 questions
5
votes
1 answer

How to set disabled select option in Laravel?

In a controller function, I extract all the attributes and the attributes that I have already used. All the attributes: $attributeNames = array('' => 'Select Attribute Name') + AttributeName::lists('name' , 'id'); Already Taken…
Anastasie Laurent
  • 1,169
  • 6
  • 23
  • 35
5
votes
3 answers

Call to a member function isEmpty() on a non-object?

I make my view in the controller via: $data = Lib::index(); $view = View::make('index') ->with('data', $data) ->render(); return $view; I can check if data is empty in the controller via: $data->isEmpty(); But when I try…
panthro
  • 22,779
  • 66
  • 183
  • 324
5
votes
2 answers

Laravel 4: Class does not exist

I'm using Laravel v4.2 and getting the following error: Class UserController does not exist Here is my code: user.php class UserController extends BaseController { public function index(){ return View::make('/')->with('title', 'Home |…
PandaUser
  • 83
  • 2
  • 2
  • 7
5
votes
1 answer

How do I use OpenID and implement it in my Laravel app?

I'm learning Laravel slowly and am trying to figure out how to implement OpenID for my app so I can allow users to sign in either using Google/Facebook/Twitter or the site's own registration system. I (personally) find the documentation for OpenID…
Meetarp
  • 2,331
  • 1
  • 23
  • 31
5
votes
3 answers

Laravel seeding error - wrong table name

Laravel is throwing this error when I try to seed the database. My table is institution_school and not institution_schools, what Laravel reports in the error. [Illuminate\Database\QueryException] SQLSTATE[42S02]: Base table or view not found: 1146…
Aleksandar
  • 636
  • 1
  • 7
  • 24
5
votes
1 answer

iconv(): Wrong charset, conversion from `auto' to `utf-8//IGNORE' is not allowed

I am using the thujohn/PDF-l4 plugin for my Laravel 4 framework. It works fine in local Windows environment. But when moved to my Centos production environment, the following error throws up for PDF conversion. "iconv(): Wrong charset, conversion…
winnyboy5
  • 1,486
  • 3
  • 22
  • 45
5
votes
1 answer

Laravel Routing: How to route when using URL query string?

I have a route - let's call it stats. Here is what my routing currently looks like: Route::get('stats', 'StatsController@index'); Route::get('stats/{query}', 'StatsController@store'); My goal is to show stat data if someone visits /stats and to…
sparecycle
  • 2,038
  • 5
  • 31
  • 58
5
votes
2 answers

Vagrant Laravel Homestead SSH authentication failed

On vagrant provision of Laravel Homestead I get SSH authentication failed! and the Vagrant instance won't run. SSH authentication failed! This is typically caused by the public/private keypair for the SSH user not being properly set on the guest…
Bradley Flood
  • 10,233
  • 3
  • 46
  • 43
5
votes
1 answer

Laravel: Order by specific ID

I've been looking like crazy but I can't seem to find a way of achieving something similar to this with Laravel's Eloquent: select id,name from friends order by id=5 desc Example taken from the following link: mysql SQL: specific item to be first…
adamj
  • 4,672
  • 5
  • 49
  • 60
5
votes
1 answer

Cannot execute INSERT in a read-only transaction - Laravel read/write

I'm trying to set a read/write connection in Laravel 4.2.6 and I cannot perform INSERT, but I can do UPDATE and DELETE transactions. The message that I get is: SQLSTATE[25006]: Read only sql transaction: 7 ERROR: cannot execute INSERT in a…
Rodrigo Gauzmanf
  • 2,517
  • 1
  • 23
  • 26
5
votes
3 answers

Laravel Model Event updating() not firing

class Profile extends Eloquent { protected $fillable = array('name', 'last_name', 'website', 'facebook', 'twitter', 'linkedin', 'google_plus'); public static function boot(){ parent::boot(); …
Mauro Casas
  • 2,235
  • 1
  • 13
  • 15
5
votes
1 answer

Web app and API in same Laravel project?

I am trying to figure out the best way to structure a new project that I am about to embark on. We currently have a web app and a mobile app which are both fed data by an API. Currently the web app is done on an installation of CodeIgniter and the…
ackerchez
  • 1,684
  • 7
  • 28
  • 49
5
votes
1 answer

Create a private package?

I'm creating a package but I would like to keep it private so only members of my dev team can use it. I've checked this out on Google and Satis came back as an option. I was just wondering do I need to use Satis to keep my package private or is…
panthro
  • 22,779
  • 66
  • 183
  • 324
5
votes
1 answer

why is laravel login me out when using sentry?

I'm new to Laravel and I am working on an application. I am using sentry to handle users and the login system. But even though my session expiration is set very high, I keep being logged out very frequently, at random times. Is that a laravel…
David Ross
  • 197
  • 1
  • 1
  • 6
5
votes
2 answers

Delete Elequent records older than 60 minutes

How can I delete all Eloquent Records in a database where the created_at or updated_at field is older than 60 minutes? (or any amount of time for the example) edit: posted solution as answer as @Alexxus suggested
Barry127
  • 1,212
  • 1
  • 12
  • 23