Giter VIP home page Giter VIP logo

gambling_laravel_test's Introduction

Setup

laravel composer install.

composer require laravel/laravel

node package install for vue

npm install

Running

php artisan key:generate
php artisan serve

npm run dev //(watch, hot)
npm run production //(for production)

Unit Testing

php artisan test --testsuite=Unit --stop-on-failure

Project Structure

- Backend(Laravel)

  • App/Http/Controllers/HomeController.php -> show home view

  • App/Http/Controllers/Api/AffiliateController.php -> responsible for Affiliates

  • App/Classes/Affiliates.php -> responsible for making affiliate array from JSON and filtering them by distance.

  • App/Helpers/Helper.php -> define some helper functions.

  • Config/gambling.php -> config variables of this project.

  • Routes/web.php -> register api for web// Route::get('/{any}', [App\Http\Controllers\HomeController::class, 'index'])->name('home')->where('any', '.*');

  • Routes/api.php -> register api

    Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
        return $request->user();
    });
    
    Route::get('/v1/affiliates', [AffiliateController::class, 'getAffiliates']);
    

- Frontend(Vue)

  • resources/js/views -> main page vue components
  • resources/js/service/service.api.js -> axios api functions
  • resources/js/service/service.function.js -> some helper functions in frontend side
  • resources/store -> define store(mutation, state, action, getter)
  • resources/components -> define reusable components.
  • resources/routes.js -> define vue routes
  • resources/assets/sass -> define sass

- affiliates repository file path

storage/app/affiliates.txt

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.