Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Anas Anjaria
    @anasanjaria
    now when I type url http://dev.laravel.com/explorer/
    it says The page isn't redirecting properly
    actually using localhost/api/explorer redirect me to localhost/explorer
    so I create virtual host dev.laravel.com
    Anas Anjaria
    @anasanjaria
    Arul
    @Arul-
    I guess you are using apache server
    you need to make the following change to the .htaccess file
    comment the following line in public/htaccess
    # Redirect Trailing Slashes...
    RewriteRule ^(.*)/$ /$1 [L,R=301]
    Above redirect rule is the one causing the trouble
    Anas Anjaria
    @anasanjaria
    still the same issue
    Arul
    @Arul-
    I will update the laravel/database repo with the change
    Anas Anjaria
    @anasanjaria
    one more thing with new laravel/database structure
    how can I manage environment based configuration
    like .env.local.php in laravel
    will uses local environment
    and config/local
    Arul
    @Arul-
    give me some time, I will get back on them later
    Anas Anjaria
    @anasanjaria
    ok
    Anas Anjaria
    @anasanjaria
    regarding environment based configuration I got it how can I do that
    renamed .env.example to .env
    Arul
    @Arul-
    ok
    Anas Anjaria
    @anasanjaria
    & APP_ENV=local with tell that system have to used local environment
    am i on right path ?? isnt it
    Arul
    @Arul-
    glad you got it right
    Anas Anjaria
    @anasanjaria
    thanks :)
    Anas Anjaria
    @anasanjaria
    is there any support for localization in laravel structure / restler ?
    Arul
    @Arul-
    not yet
    Anas Anjaria
    @anasanjaria

    @Arul- under app.php of laravel type structure ... i found this

    'Cache' => 'Illuminate\Support\Facades\Cache',

    but no corresponding service provider .. how it gonna work ?

    Actually I have created my simple facade that is working in laravel framework but not on restler + laravel type structure ??

    Arul
    @Arul-
    @anasanjaria Remember Laravel/Database has only the minimal stuff required to make Eloquent work the same way it does inside laravel. To keep it thin other parts of laravel are left out. Use iCache and create your own class that implements it instead
    Anas Anjaria
    @anasanjaria

    @Arul- I have created a class Users under app/con troller with one method protected

    ``/**

     * @access protected
     * @class AccessControl {@requires user}
     */
    function index()
    {
        return User::all();
    }``

    and add authentication class AccessControl ( the one used in examples ).

    error_log gives the following message

    PHP Notice: Undefined index: AccessControl in /path/to/my/project/../vendor/restler/framework/Luracast/Restler/Restler.php on line 667, referer: http://api.laravel.com/explorer/

    I tired to place AccessControl.php class under app/controller or under public folder where we have index.php .. but its still not working ..

    am I doing anything wrong ?

    Arul
    @Arul-
    try running php artisan dump-autoload
    Anas Anjaria
    @anasanjaria
    i tried but didnt work for me
    also we have autoload controllers via psr-0
    so i dun think dump-autoload will be necessary
    Arul
    @Arul-
    does your classes have any namespace?
    Anas Anjaria
    @anasanjaria
    no
    I have put my Authetication class i.e AccessControl under app/controller
    Arul
    @Arul-
    thats fine
    Anas Anjaria
    @anasanjaria
    Arul
    @Arul-
    ok
    Arul
    @Arul-
    there is no AccessControl in the repo
    Anas Anjaria
    @anasanjaria
    wait plz
    here it is
    Arul
    @Arul-
    ok will check and get back to you tomorrow
    ok no problem
    Anas Anjaria
    @anasanjaria

    @Arul- I try to debug the code & comparing the same code with working copy of example of restler ( core i.e without laravel structure ) .

    I altered composer.json file in my existing code based on laravel type structure & removed "": "app/custom" from autoload ( ps0 ) .. `

    Now its not throwing that notice any more i.e PHP Notice: Undefined index: AccessControl ... as described above ..

    But what I figured out is $r->addAuthenticationClass('AccessControl'); does not have any impact on code. What am I trying to say is even writing die('aaa') under __isAllowed function of AccessControl does not print aaa on screen/console log .