定制 akas/laravel-bridge 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

akas/laravel-bridge

最新稳定版本:v2.0.3

Composer 安装命令:

composer require akas/laravel-bridge

包简介

use illuminate component laravel outside laravel in any project

README 文档

README

Installation

Add Presenter to your composer.json file:

"require": {
    "akas/laravel-bridge": "^2.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

use Akas\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::run([
        'basePath' => FCPATH
    ])
    ->setupDatabase($connections);

eloquent

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

dd(User::all());

view

view.blade.php

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

view

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

Example

Laraigniter

统计信息

  • 总下载量: 15
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-01