PHP code example of recca0120 / laravel-bridge

1. Go to this page and download the library: Download recca0120/laravel-bridge 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/ */

    

recca0120 / laravel-bridge example snippets


use Recca0120\LaravelBridge\Laravel;

        '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
    ]);

class User extends \Illuminate\Database\Eloquent\Model
{
    protected $fillable = [
       'name',
       'email',
       'password',
   ];
}

var_dump(User::all());

@foreach ($rows as $row)
    {{ $row }};
@endforeach

echo View::make('view', ['rows' => [1, 2, 3]]);