承接 sukohi/laravel-js-helper 相关项目开发

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

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

sukohi/laravel-js-helper

Composer 安装命令:

composer require sukohi/laravel-js-helper

包简介

A Laravel package that provides helper functions for JavaScript like route(), dd() and constant().

README 文档

README

A Laravel package that provides helper functions for JavaScript like route(), dd() and constant().

Available versions:

  • Laravel 9
  • Laravel 8
  • Laravel 7
  • Laravel 6

Installation

Run the following command to install the package:

composer require sukohi/laravel-js-helper

Then, publish a config file called config/js_helper.php.

php artisan vendor:publish --tag="laravel-js-helper-config"

After that, set your route names and/or constants that you'd like to use in JavaScript in the file`.

Usage

<script src="/js/helper.js"></script>
<script>

    window.onload = () => {

        // URL from routes
        const url = route('item.edit', 1); // <- here
        console.log(url);

        // Constants
        const appName = constant('APP_NAME'); // <- here
        console.log(appName);

        // Debug
        const str1 = 'Test 1';
        const str2 = 'Test 2';
        const str3 = 'Test 3';
        dd(str1, str2, str3); // <- here

    };

</script>

License

This package is licensed under the MIT License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-02-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固