lundi 1 août 2016

Laravel not save the error files in storage folder

For example, if I get a laravel error in my view generates a file with string numbers:

ErrorException in 19d7345bcbbf651c1b34743d90b6a81a950dbcec.php line 3:

Previously these files are stored in the storage folder, but it is not currently saving.

how can I activate the saved again?

with a environment variable?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2as3kRh
via IFTTT

Laravel, not able to save session with `antonioribeiro/tracker` package

I have successfully able to installantonioribeiro/tracker package in my laravel project. In my project, theantonioribeiro/tracker package saving tracker_agents, tracker_cookies, tracker_routes, tracker_route_paths etc.

but, not able to save the tracker_sessions? I attached my file tracker.php code here.

return [

    /**
     * Enable it?
     */
    'enabled' => true,

    /**
     * Robots should be tracked?
     */
    'do_not_track_robots' => true,

    /**
     * Which environments are not trackable?
     */
    'do_not_track_environments' => [
        // defaults to none
    ],

    /**
     * Which routes names are not trackable?
     */
    'do_not_track_routes' => [
        'tracker.stats.*',
    ],

    /**
     * The Do Not Track Ips is used to disable Tracker for some IP addresses:
     *
     *     '127.0.0.1', '192.168.1.1'
     *
     * You can set ranges of IPs
     *     '192.168.0.1-192.168.0.100'
     *
     * And use net masks
     *     '10.0.0.0/32'
     *     '172.17.0.0/255.255.0.0'
     */
    'do_not_track_ips' => [
        '127.0.0.0/24' /// range 127.0.0.1 - 127.0.0.255
    ],

    /**
     * Log every single access?
     *
     * The log table can become huge if your site is popular, but...
     *
     * Log table is also responsible for storing information on:
     *
     *    - Routes and controller actions accessed
     *    - HTTP method used (GET, POST...)
     *    - Error log
     *    - URL queries (including values)
     */
    'log_enabled' => true,

    /**
     * Log SQL queries?
     *
     * Log must be enabled for this option to work.
     */
    'log_sql_queries' => true,

    /**
     * If you prefer to store Tracker data on a different database or connection,
     * you can set it here.
     *
     * To avoid SQL queries log recursion, create a different connection for Tracker,
     * point it to the same database (or not) and forbid logging of this connection in
     * do_not_log_sql_queries_connections.
     */
    'connection' => 'tracker',

    /**
     * Forbid logging of SQL queries for some connections.
     *
     * To avoid recursion, you better ignore Tracker connection here.
     *
     * Please create a separate database connection for Tracker. It can hit
     * the same database of your application, but the connection itself
     * has to have a different name, so the package can ignore its own queries
     * and avoid recursion.
     *
     */
    'do_not_log_sql_queries_connections' => [
        ''
    ],

    /**
     * Also log SQL query bindings?
     *
     * Log must be enabled for this option to work.
     */
    'log_sql_queries_bindings' => false,

    /**
     * Log events?
     */
    'log_events' => true,

    /**
     * Which events do you want to log exactly?
     */
    'log_only_events' => [
        // defaults to logging all events
    ],

    /**
     * What are the names of the id columns on your system?
     *
     * 'id' is the most common, but if you have one or more different,
     * please add them here in your preference order.
     */
    'id_columns_names' => [
        'id'
    ],
    /**
     * Do not log events for the following patterns.
     * Strings accepts wildcards:
     *
     *    eloquent.*
     *
     */
    'do_not_log_events' => [
        'illuminate.log',
        'eloquent.*',
        'router.*',
        'composing: *',
        'creating: *',
    ],

    /**
     * Do you wish to log Geo IP data?
     *
     * You will need to install the geoip package
     *
     *     composer require "geoip/geoip":"~1.14"
     *
     * And remove the PHP module
     *
     *     sudo apt-get purge php5-geoip
     *
     */
    'log_geoip' => false,

    /**
     * Do you wish to log the user agent?
     */
    'log_user_agents' => true,

    /**
     * Do you wish to log your users?
     */
    'log_users' => true,

    /**
     * Do you wish to log devices?
     */
    'log_devices' => true,

    /**
     * Do you wish to log HTTP referers?
     */
    'log_referers' => true,

    /**
     * Do you wish to log url paths?
     */
    'log_paths' => true,

    /**
     * Do you wish to log url queries and query arguments?
     */
    'log_queries' => true,

    /**
     * Do you wish to log routes and route parameters?
     */
    'log_routes' => true,

    /**
     * Log errors and exceptions?
     */
    'log_exceptions' => true,

    /**
     * A cookie may be created on your visitor device, so you can have information
     * on everything made using that device on your site.    *
     */
    'store_cookie_tracker' => true,

    /**
     * If you are storing cookies, you better change it to a name you of your own.
     */
    'tracker_cookie_name' => 'tesst',

    /**
     * Internal tracker session name.
     */
    'tracker_session_name' => 'tracker_session',

    /**
     * ** IMPORTANT **
     *   Change the user model to your own.
     */
    'user_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\User',

    /**
     * You can use your own model for every single table Tracker has.
     */

    'session_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\Session',

    'log_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\Log',

    'path_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\Path',

    'query_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\Query',

    'query_argument_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\QueryArgument',

    'agent_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\Agent',

    'device_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\Device',

    'cookie_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\Cookie',

    'domain_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\Domain',

    'referer_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\Referer',

    'referer_search_term_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\RefererSearchTerm',

    'route_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\Route',

    'route_path_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\RoutePath',

    'route_path_parameter_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\RoutePathParameter',

    'error_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\Error',

    'geoip_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\GeoIp',

    'sql_query_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\SqlQuery',

    'sql_query_binding_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\SqlQueryBinding',

    'sql_query_binding_parameter_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\SqlQueryBindingParameter',

    'sql_query_log_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\SqlQueryLog',

    'connection_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\Connection',

    'event_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\Event',

    'event_log_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\EventLog',

    'system_class_model' => 'PragmaRX\Tracker\Vendor\Laravel\Models\SystemClass',

    /**
     * Laravel internal variables on user authentication and login.
     */
    'authentication_ioc_binding' => 'auth', // defaults to 'auth' in Illuminate\Support\Facades\Auth

    'authenticated_check_method' => 'check', // to Auth::check()

    'authenticated_user_method' => 'user', // to Auth::user()

    'authenticated_user_id_column' => 'id', // to Auth::user()->id

    'authenticated_user_username_column' => 'email', // to Auth::user()->email

    /**
     * Enable the Stats Panel?
     */
    'stats_panel_enabled' => false,

    /**
     * Stats Panel routes before filter
     *
     */
    'stats_routes_before_filter' => '',

    /**
     * Stats Panel routes after filter
     *
     */
    'stats_routes_after_filter' => '',

    /**
     * Stats Panel routes middleware
     *
     */
    'stats_routes_middleware' => '',

    /**
     * Stats Panel template path
     */
    'stats_template_path' => '/templates/sb-admin-2',

    /**
     * Stats Panel base uri.
     *
     * If your site url is http://wwww.mysite.com, then your stats page will be:
     *
     *    http://ift.tt/2aJ94YJ
     *
     */
    'stats_base_uri' => 'stats',

    /**
     * Stats Panel layout view
     */
    'stats_layout' => 'pragmarx/tracker::layout',

    /**
     * Stats Panel controllers namespace
     */
    'stats_controllers_namespace' => 'PragmaRX\Tracker\Vendor\Laravel\Controllers',
];

Can anybody point me out where I was working wrong? Thanks.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2alQ1Ar
via IFTTT

Multiple DB update query using Laravel 5

I'm new in Laravel and I'm trying to update mysql table's multiple rows using one query. I need to update for example 100 rows like this:

 $q = \DB::table('exmaple')
                     ->where('exampleID', $array)
                     ->update(array('Viewed' => 1));

$array is array with ID-s. I have try also to implode array to string, then execute query, but with no result. Can anyone help?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2alPoGP
via IFTTT

Laravel 5 Routing ALL routes

I am new to laravel, and im trying to get redirect all incoming requests from /example to exampleController@index I am using this route

 Route::match(['get', 'post'], '/example/{any}', ['uses' =>'exampleController@index'])->where('any', '.*');

Everything works fine with /example/any/any/any, but I am getting No input file specified. error when i try /example/any/any/any.php Please help me to solve this problem. Thanks.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2aJ8URh
via IFTTT

Is it possible to create a custom paginator in laravel 5 with previous and next buttons?

I want to create a custom laravel 5 paginator which does not take the count of the collection for pagination and has next and previous links possibly. So the data is loaded sooner like when LIMIT is used. The count of the collection delays the process, so I want a paginator that displays first 15 or 20 results and next as the buttons are clicked.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2aWCG1h
via IFTTT

Baum nested set, how to get category in random order?

I'm using Baum nested set for category and sub-category in my application with Laravel 5.2 (The categories I use them as my menu), I want the menu to keep changing on page refresh and when user navigate to different pages.

Just wondering if there's a way I can fetch category using Baum Nested set in random order.

currently using:

Category::all()->toHierarchy()->get();

It works fine, but when I try

Category::inRandomOrder()->toHierarchy()->get();

doesn't work.

Anyone tried this before?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2aCJh1S
via IFTTT

Post/share data from RSS to social networking site

How my app will work ?

1) User will signup

2) He/She will input his/her website RSS

3) He/She will add his/her social networks to where the website latest posts will automatically load.

I am creating a web application which will grab rss feed from a website which will be input by user, and now from that fetched RSS I want to post the recent and new posts to the social networks. I can easily fetch the RSS via Laravel but what I am trying to do now is share the latest post to social networks like facebook and twitter of the user.

Now the question is How to integrate these social networks where user can integrate his account and then my app will post his website latest posts in there.

What I Tried to do:

I just created a Controller which is able to get the website RSS feeds, but I am confused how to send these feeds to social networking sites ?

Route:

Route::get('/', 'FeedController@demo');

Controller:

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;
class FeedController extends Controller
{
   public function demo() {
    $feed = \Feeds::make('http://ift.tt/2atv6KM', true); // if RSS Feed has invalid mime types, 
    $data = array(
      'title'     => $feed->get_title(),
      'permalink' => $feed->get_permalink(),
      'items'     => $feed->get_items(),
    );

    return view('welcome', $data);
  }
}

view

<div class="header">
    <h1><a href=""></a></h1>
</div>

@foreach ($items as $item)
    <div class="item">
      <h2><a href=""></a></h2>
      <p></p>
      <p><small>Posted on </small></p>
    </div>
 @endforeach

PS : I tired a lot of resources but found nothing, if you know any package/helper that would be great.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2aFIbnC
via IFTTT