Git Product home page Git Product logo

Comments (3)

liebig avatar liebig commented on July 4, 2024

Hi Branok,

Thanks for using Cron. Please remove your route definition and controller for testing and try to call http://mydomain.com/cron.php?key=mykey again. Does this work? Your controller is placed at laravel/app/controllers/ and extends the BaseController? Your route definition should be in the laravel/app/routes.php file and please add the controller method to envoke. An example could be:

Route::get('/', 'HomeController@showWelcome');

Your controller can look like this:

<?php
class HomeController extends BaseController {
    /*
    |--------------------------------------------------------------------------
    | Default Home Controller
    |--------------------------------------------------------------------------
    |
    | You may wish to use controllers instead of, or in addition to, Closure
    | based routes. That's great! Here is an example controller method to
    | get you started. To route to this controller, just add the route:
    |
    |   Route::get('/', 'HomeController@showWelcome');
    |
    */
    public function showWelcome()
    {
                return View::make('home', array('name' => 'Branok'));
    }
}

Laravel's routes are not dispatched before Cron's \Route::get('cron.php', function()... definition is added. Within the bootstrap process all Service Providers will be loaded and started. At this point Crons route will be registered. After all of the service providers have been registered, your app/start files will be loaded. Lastly, your app/routes.php file with your Route::get('/', 'HomeController@showWelcome'); defintion will be loaded. Once your routes.php file has been loaded, the Request object is sent to the application so that it may be dispatched to a route. For more information about the Request Lifecycle have a look here: http://laravel.com/docs/4.2/lifecycle.

When nothing helps, please provide me the source code of the routes.php and laravel/app/controllers/YourController.php and the complete exception stack trace.

from cron.

branok avatar branok commented on July 4, 2024

Hi Liebig,

thanx for fast and detailed answer. The problem was on my side. First - my key contained # and I didn't notice that app.php I have opened in editor remotely contains old version without your provider and after I changed debug to true to see stacktrace I replaced new version with old one. Now it's working without problems.

I'm really sorry for waisting your time and thanx again for great package! :)

from cron.

liebig avatar liebig commented on July 4, 2024

Hi Branok,

That are great news. Thank you for your reply. Your are welcome!

from cron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.