Giter Site home page Giter Site logo

laravel-polymorphic-relations's Introduction

#Getting started

See this thread for reference: Save Polymorphic table

  1. Clone this repository
  • Using SSH [email protected]:alenabdula/laravel-polymorphic-relations.git
  • Using HTTP https://github.com/alenabdula/laravel-polymorphic-relations.git
  1. Install framework dependencies: composer install, if using Laravel Elixir install Node dependencies: npm install
  2. Create .env file, configure your environment and database, see my local configuration in .env.example file. If you decide to use sqlite, make sure to create database.sqlite inside database/ directory.
  3. Migrate your database: php artisan migrate
  4. Start local server: php artisan serve and visit localhost:8000, if 8000 port is used, try php artisan serve --port 8888

##Application Routes

  1. GET: / - Home Route
  2. GET: /article - article.index - Display all articles
  3. POST: /article - article.store - Create article
  4. GET: /article/create - article.create - Display form to create new article
  5. GET: /article/{article} - article.show - Display particular article
  6. PUT|PATCH: /article/{article} - article.update - Update article
  7. DELETE: /article/{article} - article.destroy - Delete article
  8. GET: /article/{article}/edit - article.edit - Display form to edit article
  9. POST: /article/{id}/comment - article.comment.store - Create comment for particular article

##Assets

  • JavaScript, I've added single method to Vue instance named destroy, it's used to confirm and delete particular article. It displays confirm prompt and submits form.

laravel-polymorphic-relations's People

Contributors

alenabdula avatar

Stargazers

Farhat Sharif avatar Porrapat Petchdamrongskul avatar Mostafa Kamal 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.