laravel-4

Laravel4 unable to create a directory although I gave correct permissions

末鹿安然 提交于 2019-12-21 09:16:14
问题 Laravel4 unable to create a directory although I gave correct permissions. FileException error happened, http://s28.postimg.org/xkor8srxp/2014_01_03_2_53_18.png. I tried lots of permissions.. sudo chmod -R 777 storage sudo chmod -R 707 storage sudo chmod -R o+rwx storage and I even restarted Apache server. I have been googling 24 hours or so, and still can't figure out.. Here are the routes and view files. // routes.php Route::post('handle-form', function() { $name = Input::file('book')-

Laravel - RuntimeException - Could not scan for classes inside “app/tests/TestCase.php”

限于喜欢 提交于 2019-12-21 07:28:09
问题 I've been using Laravel to display a custom blog for a month or so now and it's been working perfectly. I just took a look at my site and it's saying: /vendor/symfony/security/Symfony/Component/Security/Core/Util/SecureRandom.php): failed to open stream: No such file or directory Having looked in the folders the location of the above file is actually: /vendor/symfony/security-core/Symfony/Component/Security/Core/Util/SecureRandom.php): failed to open stream: No such file or directory but I

How to use php artisan migrate command of Laravel4 in Heroku?

荒凉一梦 提交于 2019-12-21 07:22:05
问题 I am suing Heroku dev plan for creating database using PostgreSQL . Database is created in Heroku. After running heroku pg:info command $ heroku pg:info === HEROKU_POSTGRESQL_XXX_URL Plan: Hobby-dev Status: available Connections: 1 PG Version: 9.3.1 Created: 2013-11-27 04:00 UTC Data Size: 6.4 MB Tables: 0 Rows: 0/10000 (In compliance) Fork/Follow: Unsupported Rollback: Unsupported Result shows zero tables, which is correct. In my local machine tables are created by using following command

How to use php artisan migrate command of Laravel4 in Heroku?

烈酒焚心 提交于 2019-12-21 07:21:41
问题 I am suing Heroku dev plan for creating database using PostgreSQL . Database is created in Heroku. After running heroku pg:info command $ heroku pg:info === HEROKU_POSTGRESQL_XXX_URL Plan: Hobby-dev Status: available Connections: 1 PG Version: 9.3.1 Created: 2013-11-27 04:00 UTC Data Size: 6.4 MB Tables: 0 Rows: 0/10000 (In compliance) Fork/Follow: Unsupported Rollback: Unsupported Result shows zero tables, which is correct. In my local machine tables are created by using following command

Sort Eloquent Collection by created_at

时光怂恿深爱的人放手 提交于 2019-12-21 06:53:08
问题 I have a table named 'posts' with the columns: 'post_id int primary increments', 'poster_id int' and 'status text' as well as an array named friends with the columns: 'user_id int primary' and 'friend_ids text'. I need to grab all the IDs in the friends text column which is easy enough using: $friends = explode(',', \Friend::where('user_id', \Sentry::getUser()->id)->first()->friend_ids); Where the data in the text column would look like '1,2,3,' etc. Then I create an Eloquent Collection

setting up phpChart in laravel

∥☆過路亽.° 提交于 2019-12-21 06:03:32
问题 Environment:Amazon EC2. Ubuntu x64. (GD library installed) I'm recently using phpChart for graph and report in laravel framework. I'm stuck at the beginning stage. Here's what I've done. 1.Unzip the contents in phpChart_Lite to /var/www/app/libraries/phpChart. 2.Edit composer.json and add : "autoload": { "classmap": [ ... "app/libraries" ] }, 3.run:composer dump-autoload 4.modify conf.php in phpChart_Lite define('SCRIPTPATH',app_path().'/libraries/phpChart_Lite/'); Here's my test page code: <

Laravel 4 app logs user out anytime an AJAX POST is made

和自甴很熟 提交于 2019-12-21 06:03:29
问题 I have a nightmare of a Laravel 4 issue. Anytime and every single time an AJAX POST is made to the server in the app, it immediately logs the user you of the system! This is horrible and impossible to debug ti seems Does anyone have any ideas for a solution? Below are some examples of the AJAX request being made... $.ajax({ type: 'post', url: '/orders/orderboards/order/add-item-comment', data: 'order_item_id=' + order_item_id+'&name='+name+'&body='+body+'&user_id='+user_id, success: function

How to see laravel view without php Artisan serve

孤街醉人 提交于 2019-12-21 05:45:13
问题 How can I see the Laravel view without an artisan command CLI . I don't have CLI from my hosting provider, I only have access to FTP , to run Laravel I have to use this command in CLI : php artisan serve --port=8080 --host=0.0.0.0 How can I get the view without this command? Thanks. 回答1: php artisan serve is not ment for use in production environments because it uses PHP5 build in webserver. If you're with a hosting provider, they probably run Apache and you can just serve your app via Apache

Named routes with optional url $param(s) - Laravel 4

人盡茶涼 提交于 2019-12-21 05:17:11
问题 I've ran into a bit of a quirk with L4 (possibly symfony2?) routing for which I can't seem to find any resources online or in the wonderful Code Bright, and came up empty in IRC. I'm trying to use optional params with a named route through a controller, but receive an error when loading the view. Route: Route::get('/topic/{topicID?}', array( 'as' => 'topicDetails', 'uses' => 'TopicController@showTopic' )); Controller: class TopicController extends BaseController { public function showTopic(

Laravel Crypt - Comparing Values

故事扮演 提交于 2019-12-21 05:08:20
问题 Given that Laravel's Crypt always adds salt, and so therefore no two instances of the same encryption are the same. Normally, this is fine because I can compare the decrypted version of the two. However, what if I want to search for a value that is encrypted in the database? Say that I have a table of users and I would like to encrypt the email address. Now I want to find somebody by the email test@email.com . How do I go about to write the query for this? I cannot just Crypt::encrypt($email)