承接 muhammadanasdevs/laravel-vue-modules 相关项目开发

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

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

muhammadanasdevs/laravel-vue-modules

最新稳定版本:v1.0.0

Composer 安装命令:

composer require muhammadanasdevs/laravel-vue-modules

包简介

Laravel Vue Module management

README 文档

README

Software License GitHub all releases

Laravel laravel-modules
10.0 ^1.0.0

muhammadanasdevs/laravel-vue-modules is a Laravel package which created to manage your large Laravel app using modules. Module is like a Laravel package, it has some views, controllers or models. This package is supported and tested in Laravel 10.

Install

To install through Composer, by run the following command:

composer require muhammadanasdevs/laravel-vue-modules

The package will automatically register a service provider and alias.

Optionally, publish the package's configuration file by running:

php artisan vendor:publish --provider="Muhammadanasdevs\Modules\LaravelModulesServiceProvider"

Autoloading

By default, the module classes are not loaded automatically. You can autoload your modules using psr-4. For example:

{
  "autoload": {
    "psr-4": {
      "App\\": "app/",
      "Modules\\": "Modules/",
      "Database\\Factories\\": "database/factories/",
      "Database\\Seeders\\": "database/seeders/"
  }

}

Tip: don't forget to run composer dump-autoload afterwards.

Documentation

You'll find installation instructions and full documentation on https://docs.laravelmodules.com/.

Addition

I only added vue router:

    npm run dev
    npm install vue vue-router vue-axios --save
    npm i @vitejs/plugin-vue
    npm install vuex --save
    php artisan vue-init

add this to web.php

Route::get('{any}', function () {
    return view('welcome');
})->where('any', '.*');

Next, add below script to welcome.blade.php

<!DOCTYPE html>
<html>
    <head>
        @vite('resources/css/app.css')
    </head>
<body>
    <div id="app"></div>
    @vite('resources/js/app.js')
</body>
</html>

Finally, add this to your vite.config.js

import vue from "@vitejs/plugin-vue";

plugins: [
        vue(),
        laravel({
            input: ['resources/css/app.css', 'resources/js/app.js'],
            refresh: true,
        }),
    ],

About Muhammadanasdevs

Muhammadanasdevs is a freelance web developer specialising on the Laravel framework. View all my packages on my website, or visit my LinkedIn.

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-28