Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/recca0120/laravel-bridge
use laravel eloquent, blade, pagination in any project
https://github.com/recca0120/laravel-bridge
Last synced: 24 days ago
JSON representation
use laravel eloquent, blade, pagination in any project
- Host: GitHub
- URL: https://github.com/recca0120/laravel-bridge
- Owner: recca0120
- License: mit
- Created: 2016-07-31T05:14:59.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-02-05T05:05:07.000Z (almost 5 years ago)
- Last Synced: 2024-04-29T18:08:46.357Z (7 months ago)
- Language: PHP
- Homepage:
- Size: 50.8 KB
- Stars: 31
- Watchers: 6
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## Installation
Add Presenter to your composer.json file:
```json
"require": {
"recca0120/laravel-bridge": "^1.0.0"
}
```> Require `illuminate/translation` when using Pagination.
Now, run a composer update on the command line from the root of your project:
```
composer update
```> **NOTICE**: NOT support Laravel 5.4.*
## How to use
setup
```php
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
```php
class User extends \Illuminate\Database\Eloquent\Model
{
protected $fillable = [
'name',
'email',
'password',
];
}var_dump(User::all());
```view
view.blade.php
```php
@foreach ($rows as $row)
{{ $row }};
@endforeach
```view
```php
echo View::make('view', ['rows' => [1, 2, 3]]);
```### Example
[Laraigniter](https://github.com/recca0120/laraigniter)