Package Data | |
---|---|
Maintainer Username: | recca0120 |
Maintainer Contact: | recca0120@gmail.com (recca0120) |
Package Create Date: | 2016-07-31 |
Package Last Update: | 2020-02-05 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-26 15:15:52 |
Package Statistics | |
---|---|
Total Downloads: | 228 |
Monthly Downloads: | 14 |
Daily Downloads: | 0 |
Total Stars: | 31 |
Total Watchers: | 6 |
Total Forks: | 7 |
Total Open Issues: | 1 |
Add Presenter to your composer.json file:
"require": {
"recca0120/laravel-bridge": "^1.0.0"
}
Now, run a composer update on the command line from the root of your project:
composer update
setup
use Recca0120\LaravelBridge\Laravel;
require __DIR__.'/vendor/autoload.php';
$connections = [
'default' => [
'driver' => 'mysql',
'host' => 'localhost',
'port' => 3306,
'database' => 'forge',
'username' => 'forge',
'password' => '',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,
'engine' => null,
],
];
Laravel::instance()
->setupView(__DIR__.'/views/', __DIR__.'/views/cache/compiled/')
->setupDatabase($connections)
->setupPagination()
->setupTracy([
'showBar' => true
]);
eloquent
class User extends \Illuminate\Database\Eloquent\Model
{
protected $fillable = [
'name',
'email',
'password',
];
}
var_dump(User::all());
view
view.blade.php
@foreach ($rows as $row)
{{ $row }};
@endforeach
view
echo View::make('view', ['rows' => [1, 2, 3]]);