PHP has two object operators. The first, ->, is used when you want to call a method on an instance or access an instance property. The second, ::, is used when you want to call a static method, access a static variable, or call a parent class’s version of a method within a child class.

When you execute command generator php artisan generate:controller EventController and this error comes out [InvalidArgumentException] There are no commands defined in the “generate” namespace. Here is the solution: The generate command is from the JeffreyWay/Laravel-4-Generators package, to install it you have to execute composer require way/generators 2.* And then add this line to your app/config/app.php […]

The reason for this error is about updating setting for app/config/mail.php in order to suite SMTP information in your Mail::send() implementation. Change the mail settings according to the following: ‘host’ => ‘smtp.gmail.com’, ‘port’ => 465, ‘encryption’ => ‘ssl’, ‘username’ => ‘your_username’, ‘password’ => ‘your_password’, Then your code should be as simple as: public function email() […]

Suppose you a domain, http://domain.com. Here’s an example of the structure you might be using: domain.com/ (the root of your web hosting) –>yourlaravel4_base/ –>[some other folders…] –>public_html/ (where your html files and such go) –>[some other folders…] –>yourlaravel4/ /public_html/ is the root of the publicly accesible part of your web hosting files. You wanna make […]

Full and great cheat-sheet site for Laravel: click here , in case you lost your internet connection, here is PDF copy php artisan key:generate : generate encryption key for application php artisan migrate:install : Create the migration repository php artisan migrate:make name : Create a new migration file php artisan generate:migration –fields=”name:string, description:text, started_at:timestamp, ended_at:timestamp” […]

In Windows: Install Composer from this link. In this step, the installer will ask you the directory of php.exe, you should put C:\xampp\php\php.exe if you use XAMPP OR put c:\wamp\bin\php\php5\php.exe Clone by enter git clone https://github.com/laravel/laravel.git in Git Bash terminal or download Laravel. Make sure enable openssl from all php.ini files. If you used WAMPP, […]