承接 morbihanet/modeler 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

morbihanet/modeler

Composer 安装命令:

composer require morbihanet/modeler

包简介

Dynamic models for Laravel 5.8 and up

README 文档

README

Build Status

Usage

This package contains a class to make dynamic models easily without migration.

Once this package is installed, you can do these things:

<?php
namespace App\Models;

use Morbihanet\Modeler\Modeler;

class Book extends Modeler {}
<?php
namespace App\Models;

use Morbihanet\Modeler\Modeler;

class Author extends Modeler {}
<?php
use App\Models\Author;
use App\Models\Book;

$author = Author::create(['lastname' => 'Hugo', 'firstname' => 'Victor']);

Book::create(['title' => 'Notre Dame de Paris', 'author_id' => $author->id]);
<?php
namespace App\Http\Controllers;

use App\Models\Author;
use App\Models\Book;

class HomeController extends Controller 
{
    public function index()
    {
        $victorHugo = Author::find(1);
        $books = $victorHugo->books;

        return view('home', compact('victorHugo', 'books'));
    }
}

Installation

This package can be used with Laravel 5.8 or higher.

This package publishes a config/modeler.php file. If you already have a file by that name, you must rename or remove it.

You can install the package via composer:

composer require morbihanet/modeler

Optional: The service provider will automatically get registered. Or you may manually add the service provider in your config/app.php file:

'providers' => [
    // ...
    Morbihanet\Modeler\ModelerServiceProvider::class,
];

You should publish the migration and the config/modeler.php config file with:

php artisan vendor:publish --provider="Morbihanet\Modeler\ModelerServiceProvider"

Run the migrations: After the config and migration have been published and configured, you can create the table for this package by running:

php artisan migrate

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-04-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固