Laravel 3 is the outdated version of the open-source framework for PHP web development created by Taylor Otwell. Laravel helps you create applications using simple, expressive syntax.
Questions tagged [laravel-3]
392 questions
2
votes
1 answer
Class not found with Laravel 3 and Composer
I am attempting to use the php-resque composer package via artisan. I believe Laravel is v3.2.7. When running the command php artisan queue I get the error:
Error
PHP Fatal error: Class 'Resque' not found in /var/www/dev/application/tasks/queue.php…

Nyxynyx
- 61,411
- 155
- 482
- 830
2
votes
1 answer
Laravel : Login user without password
I am new to Laravel and it looks like a nice PHP framework. Going through the guide and various tutorials, I know how to login a user using the Auth class. However the Auth class requires a username and a password to login the user.
Now, if I am…

WebNovice
- 2,230
- 3
- 24
- 40
2
votes
2 answers
Multi-site framework in Laravel
I've just started working on a Content Management Framework using Laravel 3. It is not designed to be a database-driven app (that may come later). It is designed for web-designers wanting an easy and SEO-friendly way to make a static website.
In a…

Mike Rockétt
- 8,947
- 4
- 45
- 81
2
votes
1 answer
Laravel 3 eloquent many-to-many relationship
I have a Post model and a Tag model into a many-to-many relationship.
When I get the posts and all tags the post have I use this and it works just fine :
$posts = Post::with(array('tags'))
->where('cat_id', '=', $cat->id)
…

flavy
- 23
- 2
2
votes
1 answer
Laravel - Joining 3 tables in Eloquent
I'm trying to join 3 tables in Eloquent namely users, departments, and roles.
A user can only have one department and one role.
Here's how I've defined the models:
user model:
public function department(){
return…

user225269
- 10,743
- 69
- 174
- 251
2
votes
2 answers
getting 500 internal server error in laravel
I am new to laravel. I am trying to configure laravel accoring to tutorial https://github.com/jasonlewis/laravel-blog/wiki/Creating-a-simple-blog-in-Laravel-3. I have created admin folder but when I am trying to run http://localhost/blog/admin, I am…

user1829474
- 71
- 3
- 6
1
vote
4 answers
Logged In User Count Laravel 3
I'm using Laravel 3. How do I have a notice that can tell me how many users are currently logged in.
I wish I could explain this better but I am new to Laravel and I should upgrade to 5.1 but that is not a option at the moment.
Any help is…

Dev1997
- 657
- 1
- 5
- 16
1
vote
1 answer
Need to convert raw queries into laravel Eloquent
Below is my raw MySQL query:
SELECT T1.id, T1.department_id, COALESCE(T2.cnt, 0) AS cnt
FROM (SELECT DISTINCT id, department_id FROM users WHERE company_id = '33') AS T1
LEFT JOIN (
SELECT user_id, COUNT(*) AS cnt
…

Malarivtan
- 404
- 1
- 6
- 20
1
vote
2 answers
Model with custom table doesn't save, in Laravel 3
I have an eloquent model, that is using a custom table, coming from the user table.
Like so...
class Appointment extends Eloquent
{
public static $table = null;
public function __construct()
{
parent::__construct();
// Here…

Kylie
- 11,421
- 11
- 47
- 78
1
vote
1 answer
File not readable in Laravel
Im trying to open a template with PHPExcel, in laravel.
$objPHPExcel = PHPExcel_IOFactory::load(URL::to_asset('myfile.xls'));
However, I get a File is not readable error.
When I do this...
if(is_readable(URL::to_asset('myfile.xls')){
echo "is…

Kylie
- 11,421
- 11
- 47
- 78
1
vote
0 answers
Is Integrating an already existing php project with Laravel a wise choice?
I have a website http://aw3some.tv/ , which was initially created to be just a simple video blog kind of a thing , and as such i didn't feel the need for any frameworks . I just divided my project in the following manner :
1) I created classes for…

AnuragD
- 327
- 3
- 15
1
vote
1 answer
Laravel: Common Regex For route pattern and Model validation
Situation where I came across:
Consider the following cases :
Route::pattern() or we can use Route::({method}/{keyword})->where('keyword', {regex});
Validation Rule array( 'keyword' => "/^{regex}$/");
Both accepts different format of regex
in case…

Rajan Rawal
- 6,171
- 6
- 40
- 62
1
vote
2 answers
Laravel Equivalent of passing variables to functions in codeigniter
I am using CodeIgniter from 2 years and i am trying to move to Laravel and I saw many tutorials of how to use Laravel but i couldn't find any answers to how to pass variables to functions using the URL and without using routes like in CodeIgniter if…

Joseph Girgis
- 3,115
- 4
- 19
- 20
1
vote
1 answer
Loop over an array of objects and get values in laravel PHP
I am working on a QA app where i need to add multiple answers to a question as per requirement dynamically.
for this i am sending an object which carry question and the answers like.
question={
'question_text':'what is your name',
…

Sajid Ahmad
- 1,124
- 4
- 18
- 40
1
vote
1 answer
Defining global variable in laravel
Model: Comment.php
class Comment extends Eloquent {
protected $table = 'comments';
public $timestamps = true;
}
Controller: PageController.php
class PageController extends BaseController {
$top_comments = Comment::take(3)->get();
…

O P
- 2,327
- 10
- 40
- 73