laravel-4

how to add custom dynamic text footer in laravel 4.2 using dompdf

限于喜欢 提交于 2019-12-12 01:23:28
问题 i have followed this example laravel-4-create-pdf-use-dompdf: how to add custom dynamic footer $dompdf = \App::make('dompdf'); $dompdf->loadHTML('<h1>naeem World!!</h1>'); anyone do have idea? or please suggest, i also have followed this solution DOMPDF add a header and footer but it doesn't work correctly. Edited: i want $db_data['footer_text'] to be footer text to all the pages dynamically, its coming form database. 回答1: The solution from the link you provided should be enough. You just

Conclusion: don't install laravel/framework v4.2.22

∥☆過路亽.° 提交于 2019-12-12 01:14:00
问题 I am trying to spin up my old L4 site on Digital Ocean. After cloning everything, I tried running : sudo composer update Do not run Composer as root/super user! See https://getcomposer.org/root for details Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages. Problem 1 - Conclusion: don't install laravel/framework v4.2.22 - Conclusion: don't install laravel/framework v4.2

Passing input (form) from a page to itself

梦想与她 提交于 2019-12-12 00:58:11
问题 I am working on my first laravel script, trying to submit a form and see the input on the same page. I am working on this problem for days, hopefully someone can solve this. The problem is that i get this error: Undefined variable: data (View: D:\Programmer\wamp\www\laravel\app\views\bassengweb.blade.php) view: Bassengweb.blade.index @extends('master') @section('container') <h1>BassengWeb testrun</h1> <table> {{ Form::open(array('route' => 'bassengweb', 'url' => '/', 'method' => 'post')) }}

Laravel4: Form with image-picker

限于喜欢 提交于 2019-12-12 00:42:18
问题 In a site working with Bootstrap + Laravel4. In a form, there are some images that the user can click to select it. It is done with a nice JQuery plugin: http://rvera.github.io/image-picker/ Right now it is written in html and it is working: <label><span><i class="icon-check"></i></span> Click on a room to select it</label> <select name="rooms[]" multiple="multiple" class="image-picker show-html"> <option value=""></option> <option name="1room" data-img-src="assets/img/rooms/singleRoom.jpg"

How to remove key from json response?

こ雲淡風輕ζ 提交于 2019-12-11 23:58:21
问题 I've got a collection $tree that is being converted to json with Response::json() . The key is being automatically set to the id of the first object. Is there a way to remove this, or restructure with: 'data': [ { first object }, { second object} ] It is currently responding with: {"1":{"id":"1","parent_id":null,"lft":"1","rgt":"8","depth":"0"... When I want is: {'data':[{"id":"1","parent_id":null,"lft":"1","rgt":"8","depth":"0"... 回答1: Try to use: Response::json(array( 'data' => array_values

Laravel 4 When i retrieve info from database into input text, 1 extra space is added

人盡茶涼 提交于 2019-12-11 23:17:02
问题 I am doing a form where the user can update his information. The form shows several inputs and the info retrieved from the database is displayed inside them. I have noticed that, when the info is displayed, one extra space is added. For example, if i retrieve a date '1965-08-29', then in the form i notice that an extra space is added at the end: '1965-08-29 '. This is happening in all inputs causing validation fails. Here is a sample code about how i retrieve the data inside the controller:

Unable to set Laravel checkbox selected in edit mode

旧街凉风 提交于 2019-12-11 23:02:03
问题 I am having trouble to set the laravel checkbox selected in edit mode. So, I do the testing with clean install of latest version of laravel and created a MySQL table named "checkbox" which contains 2 columns. One is id and the other one is mycheckbox . Here is my code: Route::get('/checkbox', function(){ $data = DB::table('checkbox')->where('id', '1')->first(); var_dump($data); echo Form::model($data); echo Form::checkbox('mycheckbox', '1',true); echo Form::close(); }); I found out that no

Laravel 4 + Iron Mq: Queues fired but the mail is not sent

萝らか妹 提交于 2019-12-11 22:38:33
问题 This is the situation : I have a Laravel 4 app with Iron mq installed in order to speed up the process. It is possible to book a car and to register in the site. In both cases a mail is sent. The problem is that after installing Iron mq the mail are not sent anymore. All the rest is done, inserting data in the database, but the mails sending no. In Iron mq dashboard the queues are instead regularly received and apparently fired.. This is the route : /* CARS */ Route::get('focus', function() {

In laravel based on the dropdown list selected value make the check box as read only field

感情迁移 提交于 2019-12-11 22:15:49
问题 I have ui that contains dropdown list and check box.Based on the drop downlist selection value i want compare with the isnesd field(it is one more field in the database),based on that comparison i want to make check box as read only field. view: <!-- Asset Type --> <div class="form-group {{ $errors->has('asset_type_id') ? ' has-error' : '' }}"> <label for="asset_type_id" class="col-md-3 control-label">@lang('admin/assetdetails/form.type')</label> <div class="controls col-md-7"> <div class=

SQLSTATE[HY000] [2005] Unknown MySQL server host ' ' (2) in Laravel

余生颓废 提交于 2019-12-11 21:49:37
问题 Hi I am making a simple login in laravel and I get an error when I try to perform an authentication. It is a rather odd connection error Conection 'mysql' => array( 'driver' => 'mysql', 'host' => 'Marsur', 'database' => 'database', 'username' => 'root', 'password' => 'root', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'options' => array( PDO::ATTR_PERSISTENT => true, ), ), Controller public function doLogin(){ $rules = array('correo' => 'required|email', 'password'