承接 fschirinzi/laramote 相关项目开发

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

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

fschirinzi/laramote

Composer 安装命令:

composer require fschirinzi/laramote

包简介

Laravel Remote

README 文档

README

Test StyleCI Latest Version on Packagist Total Downloads

LaraMote allows you to run tasks in Laravel from remote. This package is helpful if you are testing your frontend (SPA) application with Cypress that uses a Laravel application as backend.

At the moment, these features are implemented:

✅ Artisan command
       ✅ Command with parameters
       ✅ Get Output
✅ Login User
       ✅ Custom key value
       ✅ Custom key/table column
       ✅ Custom model
       ✅ Remember
✅ Factory
       ✅ Make/Create
       ✅ Models
       ✅ Name
       ✅ States
       ✅ Amount
       ✅ Show hidden attributes
       ✅ Override attributes
✅ Model
       ✅ Search with custom key value
       ✅ Search with custom key/table column
       ✅ Search with custom model
       ✅ Get with limit
       ✅ Load relationships
       ✅ Show hidden attributes for model and relationships

TODO

  • Make Commands working
  • Make Tests
  • Add wiki page with all endpoints and their parameters
  • Support all class based factory features

Installation

Version Supported Factories
v0.*, v1.* Legacy Factories
v2.* Class based factories

You can install the package via composer:

composer require fschirinzi/laramote --dev

After installing LaraMote, you may publish its assets using the laramote:install Artisan command:

php artisan laramote:install

Usage

LaraMote exposes the endpoints at the /laramote URI. By default, you will only be able to access this dashboard in the local and testing environment. However, within your app/Providers/LaraMoteServiceProvider.php file, there is a gate method that controls access to the LaraMote endpoints in non-local environments. You are free to modify this gate as needed to restrict access to your LaraMote endpoints:

/**
 * Register the LaraMote gate.
 *
 * This gate determines who can access LaraMote in non-local environments.
 *
 * @return void
 */
protected function gate()
{
    Gate::define('useLaraMote', function ($user = null) {
        return in_array(optional($user)->email, [
            //
        ]);
    });
}

Examples

You can import Insomnia_example_requests.json into the Insomnia Rest-client to see some examples in action.

Upgrading

When upgrading to a new version of Laramote, you should re-publish LaraMote's assets:

php artisan laramote:publish

To keep the assets up-to-date and avoid issues in future updates, you may add the laramote:publish command to the post-update-cmd scripts in your application's composer.json file:

Customizing Middleware

If needed, you can customize the middleware stack used by LaraMote routes by updating your config/laramote.php file. If you have not published LaraMote's configuration file, you may do so using the vendor:publish Artisan command:

php artisan vendor:publish --tag=laramote-config

Once the configuration file has been published, you may edit LaraMote's middleware by tweaking the middleware configuration option within this file:

/*
|--------------------------------------------------------------------------
| LaraMote Route Middleware
|--------------------------------------------------------------------------
|
| These middleware will be assigned to every Vapor UI route - giving you
| the chance to add your own middleware to this list or change any of
| the existing middleware. Or, you can simply stick with this list.
|
*/

'middleware' => [
    'api',
    EnsureUserIsAuthorized::class,
],

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email fschirinzi25@gmail.com instead of using the issue tracker.

Credits

I used the Laravel/VaporUi package and their documentation as template to speed up the development of this package.

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固