Questions tagged [laravel-4.2]

A past version of the open-source PHP web framework created by Taylor Otwell. It was released on 2014-06-01

laravel-4.2
Filter by
Sorted by
Tagged with
55 votes
10 answers
70k views

Error: ReCAPTCHA placeholder element must be empty

I am using recaptcha with my laravel application. I just want to check recaptcha's response on form submit using jquery and stop user by alert that pleade validate captcha. but , I could not stop ...
Nirali Joshi's user avatar
  • 1,998
19 votes
4 answers
19k views

Laravel Input::hasFile('image') returns false even if a File is uploaded

I have a Form field for an Image upload, which I open with 'files' => true, like so: {{ Form::label('image', 'Image') }} {{ Form::file('image') }} And in my Controller I want to check if a File was ...
jrenk's user avatar
  • 1,406
9 votes
5 answers
6k views

jquery datatables, custom sorting on server side [closed]

I am using Laravel 4.2, with server side jQuery data-tables. Package: https://github.com/Chumper/Datatable How can I add custom sorting ? like for columns of currency, time, etc
Riz's user avatar
  • 10k
8 votes
2 answers
4k views

Laravel migrate command is not working for remote database

I am working on a project using the Laravel 4.2 framework. I want to execute the command php artisan migrate but when I run this command it shows an error: [PDOException] SQLSTATE[42000]: ...
Katty's user avatar
  • 489
7 votes
4 answers
11k views

Laravel - get DB result without table column name

I wanted to have the result with only the values not with the table column name in Laravel 4.2. For example, $recs = DB::table('table_name') ->select('id', 'title') ->get(); ...
user2609021's user avatar
7 votes
1 answer
938 views

Session is being lost in Laravel4 in production server

I am checking if the user logged in or not like this Class LoginController extends BaseController { public function getIndex(){ return View::make('login',array('eventname' => Request:...
Vikram Anand Bhushan's user avatar
6 votes
1 answer
6k views

required_without not working with multiple fields

Laravel required_without is not working when I'm passing multiple fields. This is my rules: $rules = [ 'startDate' => 'date|date_format:m/d/Y|required_without:customerId,purchaseId,orderId', ...
Raunak Gupta's user avatar
  • 10.7k
5 votes
1 answer
3k views

Running Artisan Command from laravel 4.2 Controller

I am trying to execute some custom artisan command from controller like Artisan::call('php artisan MyCustomCommand'); but it works fine when I execute php artisan MuCustomCommand from CLI. I ...
suresh726's user avatar
4 votes
1 answer
3k views

Using relationships in Laravel Eloquent with bridge table

I have an app that handles user info, and one of the pieces of data we collect is what school(s) they're attending. We have a User object, School object, and a UserSchool object. This is the ...
StackOverflowed's user avatar
4 votes
0 answers
978 views

composer could not scan for classes inside /vendor/laravel/framework/src/Illuminate/Queue/IlluminateQueueClosure.php

Basically a fresh git clone of a working repo... When I try to composer install I get an error. Seems like the laravel folders are not being installed the way composer expects to look for them? I ...
Phil's user avatar
  • 2,196
3 votes
1 answer
34k views

Run function from Button or URL in Laravel

I have the following test function, that I want to call directly from my URL or by clicking a link from my blade view. public function callMeDirectlyFromUrl() { return "I have been called ...
Maytham Fahmi's user avatar
3 votes
1 answer
2k views

Laravel 4.2: Force URL to be rendered as HTTP or HTTPS

We have a simple route defined like the following one: Route // Home Route::get('/home', [ 'as' => 'home::index', 'uses' => 'IndexController@home' ]); View <a href="{{ route('home:...
lin's user avatar
  • 18.2k
3 votes
1 answer
2k views

Deduplicating Laravel events / jobs

I have an app that processes product and order updates and use a mixture of events and jobs to respond to changes in either. Having worked on this for almost 2 years and watching it in action Ive ...
aarcarr's user avatar
  • 186
3 votes
0 answers
2k views

Downloading multiple files via SFTP in laravel

I need to transfer files over sftp in laravel. By now, I've been able to upload and download a single file with SSH facade such as SSH::into('staging')->put('somefile', 'copyfile'); SSH::into('...
Dhouard's user avatar
  • 175
2 votes
2 answers
31k views

How can i Update my laravel to latest version(8 or above)

Currently I am using Laravel 4.2. I have tried this command - composer global require laravel/installer It is installing the 4.2 Version itself. I need to update it to the latest version. Any ...
user avatar
2 votes
2 answers
5k views

How to select specific columns with eloquent "with"

Is there a way to select only specific columns when using "with" with eloquent? My problem is that i am getting a very long list of accounts and i also need to get their websites using the relation "...
shay.k's user avatar
  • 553
2 votes
2 answers
14k views

phpcs - class must be in a namespace of at least one level - how to fix?

I am using laravel 4.2. Lets say there is such class: class BShopsController extends ShopsController To fix this, I try to use name space lets say this: namespace app\controllers; and then it ...
Dariux's user avatar
  • 4,153
2 votes
1 answer
3k views

Display two columns as one

I wanted to select two columns and display it as one in my controller. Here is the code I currently have: public function assignment() { $title = "View Parent Assignment"; $vpc = DB::table('...
BourneShady's user avatar
2 votes
1 answer
796 views

currency pound is shown as &pound; when exporting as csv

I need to export data as csv. Everything is getting except the currency symbol. For eg. currency £ is shown as &pound; My project is a laravel 4.2 application. $filename = $customer['...
Geethu's user avatar
  • 390
2 votes
1 answer
1k views

Laravel fetch relation of relation without using a loop

Right now I'm in a bit of a pickle. I'm trying to optimize old code using more of laravels convention instead of fabricating my own loops in order to get the data I need. So here's what I have right ...
Deejdd's user avatar
  • 129
2 votes
1 answer
753 views

$file->isValid() returns false in laravel 4.2

$file = Input::file('video'); dd($file,$file->isValid()); enctype="multipart/form-data" is set in the form. max_upload_limit is also increased and apache restarted $file has the file, but $file-&...
dev21's user avatar
  • 580
2 votes
1 answer
2k views

Separate products in different sub categories on the page with Laravel

I've made ability for administrator to create multiple categories under sub-categories. Now I want to show each product assigned to category. The problem is that each sub-sub category show same ...
S.I.'s user avatar
  • 3,279
2 votes
1 answer
4k views

Laravel DB::unprepared

Just the 1st and 2nd statment works. When it comes to the third and fourth one, no results can be seen on the database. I checked the logs (centos x64) for both php and mariadb but no errors recorded. ...
saimcan's user avatar
  • 1,725
2 votes
1 answer
3k views

dynamodb query im trying to get some data from dynamodb using laravel

the query is work now but the problem is the attribute_not_exists when I added the attribute_not_exists the whole query not working. error message: "One or more parameter values were invalid: ...
mic_test's user avatar
  • 151
2 votes
1 answer
309 views

How to write multiprocess queues in Laravel 4.2 (having supervisord configured)?

I have a website, where users can export reports in CSV format. When they click "Export" button, I add a new row to my database table indicating that there is a new request for report generation. I ...
tohhy's user avatar
  • 145
2 votes
1 answer
277 views

How to maintain two migration tables in Laravel Migration

I'm writing a custom migration and I need to maintain those migrations in a separate migration repository table. I override DatabaseMigrationRepository and replace the migration repository function as ...
Mohamed Nizar's user avatar
2 votes
2 answers
327 views

send value from views in form of {{ FORM:: }} and recieve value in controller

i want to send value to controller from view, it is coming "null",i was expecting input of search button, Views page code: {{ Form::open(['method'=>'POST','action'=>'searchingDoctors','class'=...
Aitzaz Wattoo's user avatar
2 votes
2 answers
6k views

how to count column(with data) number in laravel excel maatwebsite

if(Input::hasFile('excel_file')){ $path = Input::file('excel_file')->getRealPath(); $data = Excel::load($path, function($reader) { $reader->setDateFormat('Y-m-d'); ...
S.M.Mohieminul Hossain's user avatar
2 votes
1 answer
69 views

Subqueries: Laravel 4.2

Concept: I tried to retrieve the common pages from 9999 and 1111. See below. (ACF Fiorentia) mysql query: SELECT * from fb_likes where page_id IN ( SELECT page_id FROM fb_likes WHERE user_fb_id = ...
sudharsan_kn's user avatar
2 votes
0 answers
290 views

Laravel pagination for GROUPED queries

I have a query which currently returns in the region of 25k records, with this likely to exceed 100k by the end of year. Obviously this is paginated for readability..... Having delved into the code ...
absolute's user avatar
2 votes
1 answer
3k views

Laravel 4.2 : MYSQL Timeout. Where to change the time gloabally

ErrorException: PDO::commit(): MySQL server has gone away This is a message i am getting. If i set all the variables in xampp (my.ini) it doesn´t change anything. Example : `innodb_lock_wait_timeout ...
JDSHC's user avatar
  • 41
2 votes
0 answers
174 views

Trying to use Amazon ElasticCache Redis Cluster on Laravel-4.2

With the following parameters I get the Predis ServerException MOVED 16353 x.x.x.x:6379. The amazon Elasticache for redis has cluster mode enabled and 2 nodes. Can anyone advise on the correct ...
Anthony Beckford's user avatar
2 votes
0 answers
61 views

how to remove the error showing below:(laravel framework)

I have viewed a lot off documents already. I am trying to do my login, but its not working. Showing errors. I don't know the reason.i am very new in laravel This is my controller code public ...
Saifur Rahman's user avatar
2 votes
1 answer
179 views

Error with HTTPS for routes in Laravel 4.2 - assets load fine over HTTPS

Laravel 4.2 I have been trying to load the app over HTTPS, it just gives 500 Internal Server Error. SSL has been installed and works fine if any of the file is accessed directly using https e.g. ...
Sachin Patel's user avatar
2 votes
0 answers
555 views

Laravel 4.2 Session not Persisting on Browser Refresh

I have a link on a page that I would like to prevent a user from clicking more than once (or refreshing the route), I need to prevent this with PHP, specifically Laravel 4.2.* Using Laravel's built ...
Alex McCabe's user avatar
  • 1,892
2 votes
0 answers
63 views

How to declare in Laravel 4.x a config array for different environmets

Having two config files named 'custom' for different environments... app/config return [ 'test' => [ 'real_a', 'real_b', 'real_c', ], ]; app/config/local return ...
Harley Fuagras's user avatar
2 votes
2 answers
3k views

Laravel Response::json() exhausts memory

I have an application which sometimes returns chunks of HTML; in this case I have to return a large table and the memory gets exhausted. I have a macro set up, which checks that the data to return is ...
clod986's user avatar
  • 2,597
2 votes
1 answer
673 views

date comparision with laravel 4.2

I want to fetch records which are older than 2 days. My current database records for added_to_cart_at field is just one row dated 2016-05-01 12:23:23 I used below code $date = new DateTime; $date-&...
Nirali Joshi's user avatar
  • 1,998
2 votes
2 answers
1k views

Disable button when validation fails

I have one form which has one submit button , I want to disable submit button until all validations are true. currently when one validation gets true , button gets enable. (even other fields has red ...
Nirali Joshi's user avatar
  • 1,998
2 votes
3 answers
1k views

php artisan migrate ignores settings in local environment directory for database

I have a weird problem with Laravel 4.2 migrations since I tried to use Homestead as my development environment. When I do a php artisan migrate I get the following error: [PDOException] ...
Thomas M.'s user avatar
  • 630
2 votes
1 answer
54 views

Why does Laravel environment change on different networks?

When at work, Laravel detects that I am on a local environment correctly, based on my machine's network name. When I take my work home with me and pop open the laptop Laravel thinks I'm on production. ...
Mr Office's user avatar
  • 290
1 vote
4 answers
11k views

Laravel multiple count in 1 Query

Im new to this Framework, i dont know how to optimize it using db::raw count and aliases and display it to my blade.php using @foreach im trying to optimize my code, my goals is to count ...
BlackLeaf's user avatar
1 vote
3 answers
15k views

laravel datatable relationships

So in this app Drawing belongsTo Customer. I have datatable <table id='drawing-table' class="table table-bordered table-hover"> <thead> &...
Edmund Sulzanok's user avatar
1 vote
3 answers
3k views

Laravel delete method: how to delete related files

I have some issue with my Laravel 4.2 project. I have a Photo model and a Service model with relationship Service hasMany Photos. Photos (files) are stored in public/upload/ directory. When I delete ...
violator667's user avatar
1 vote
2 answers
2k views

Adding token to view make laravel

I have link like this with token: <a href="{{ URL::to('/users/submit/' . $id->id) }}?_token={{ csrf_token() }}">Submit New</a> which produce url: http://example.com/users/submit/...
VLS's user avatar
  • 445
1 vote
1 answer
934 views

Client error response [url] https://api.mailgun.net/v2/sandboxxxxxxxxx.mailgun.org/messages.mime [status code] 400 [reason phrase] BAD REQUEST

Client error response [url] https://api.mailgun.net/v2/sandboxxxxxxxxx.mailgun.org/messages.mime [status code] 400 [reason phrase] BAD REQUEST I'm using Laravel 4.2 and guzzlehttp 4. Sometime mail ...
Jaydeep's user avatar
  • 25
1 vote
1 answer
273 views

laravel 4.2 eloquent: get all() + related column

Let's say we have 2 models, with following relations: Users: public function BookCode() { return $this->hasOne( 'BookCode' ); } BookCode: public function User() { return $this->...
luk's user avatar
  • 23
1 vote
1 answer
1k views

laravel 4.2 storing/uploading profilce picture and retrieving from database

i m new to laravel 4.2 i'm am developing a web application ..now i want to store a profile picture into database. this is my controller file code public function profilepicture(){ $data = Input::...
Mohit Arya's user avatar
1 vote
1 answer
182 views

Running tasks in background in laravel 4.2

I have a condition where I have to start iperf server as daemon on specified port and if iperf server is running, I have to send response to client. I tried shell_exec('iperf -s -p {port} -D'); ...
suresh726's user avatar
1 vote
1 answer
678 views

Laravel 4.2 auto incrementing row number with pagination

I have 15 rows in per page. And I want to increment the row count number even on paginate. ***** I Use Laravel 4.2 ***** <div class="portlet-body"> <div class="table-...
MNamazi's user avatar
  • 101

1
2 3 4 5