Git Product home page Git Product logo

member_app's Introduction

Build Status Total Downloads Latest Stable Version License

專案

我建立的專案中主要可以查看以下兩個功能:Task 與 User

  • Task 任務總覽

  • User 使用者總覽

說明

  • Task 在任務列表中,沒有做任何權限設定,任何登入後台的人皆可操作CRUD

  • User 在使用者列表中,只有admin可以操作CRUD,其中我設定的角色(role)只有user/admin 展示如下圖:

  • **[user] 一般使用者總覽

  • **[admin] 管理者總覽

設計說明

  • Task 沒甚麼好說的

  • User 1.在資料庫中主要以enum方法限定資料欄位role只能接受user/admin兩種角色 2.初始資料將會新增兩個使用者admin/user1,詳情資訊(email、密碼...等)請自行去看seeder 3.只有admin將賦予所有權限,從controller到view都有做相關設定,而user只能看

安裝說明

本專案是基於laravel 8 Jetstream開發,相關安裝說明可以參考官網

Important

由於@vite是在laravel 9底下才能運作的,所以需要到view/layout中的app和guest移除,並用舊的方法載入 <link rel="stylesheet" href="{{ asset('css/app.css') }}"> <script src="{{ asset('js/app.js') }}" defer></script>

1.建立sql檔:在database底下新增member.sqlite的檔案 2.複製.env.example後,改名為.env 3.在.env中修改以下資訊 DB_CONNECTION=sqlite DB_DATABASE=../database/member.sqlite

Important

由於php artisan serve和開發中所吃的相對路徑不同, 所以當想要開發時,DB_DATABASE=../database/member.sqlite要改成DB_DATABASE=database/member.sqlite才能正常使用

4.在config/database.php中修改以下資訊 'database' => env('DB_DATABASE', database_path('member.sqlite')) 5.基礎環境設定好後,請在終端中再專案底下執行 php artisan migrate:freshphp artisan db:seed --class=UserRoleSeeder 即可使用。

member_app's People

Contributors

hi-nobody avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.