1. Go to this page and download the library: Download earlybirdmvp/foundry library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
class Product extends Eloquent {
use Earlybird\Foundry;
}
class ProductController extends BaseController {
use Earlybird\FoundryController;
}
Route::resource('product', 'ProductController');
class Product extends Eloquent {
use Earlybird\Foundry;
protected $rules = array(
'name' => 'min:8'
);
}
class Product extends Eloquent {
use Earlybird\Foundry;
public function category() {
return $this->belongsTo('Category');
}
}
class Product extends Eloquent {
use Earlybird\Foundry;
protected $appends = array(
'foundry_value',
);
public function getFoundryValueAttribute() {
return $this->sku . ': ' . $this->name;
}
}
class OrderController extends BaseController {
use Earlybird\FoundryController;
public function detectChange() {
// Email customer update that order status was changed
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.