Skip to content

Laravel App to create facebook quizzes on Facebook and go viral

Notifications You must be signed in to change notification settings

luisintosh/facebook-quizz-laravel

Repository files navigation

Facebook Quizz

Getting started

Installation

Please check the official laravel installation guide for server requirements before you start. Official Documentation

Clone the repository

git clone [email protected]:luisintosh/facebook-quizz.git

Switch to the repo folder

cd facebook-quizz

Install all the dependencies using composer

composer install

Copy the example env file and make the required configuration changes in the .env file

cp .env.example .env

Generate a new application key

php artisan key:generate

Run the database migrations (Set the database connection in .env before migrating)

php artisan migrate

Start the local development server

php artisan serve

You can now access the server at http://localhost:8000

Database seeding

Populate the database with seed data with relationships which includes users, articles, comments, tags, favorites and follows. This can help you to quickly start testing the api or couple a frontend and start using it with ready content.

Open the DummyDataSeeder and set the property values as per your requirement

database/seeds/DummyDataSeeder.php

Run the database seeder and you're done

php artisan db:seed

Note : It's recommended to have a clean database before seeding. You can refresh your migrations at any point to clean the database by running the following command

php artisan migrate:refresh

Before using Socialite, you will also need to add credentials for the OAuth services your application utilizes. These credentials should be placed in your .envconfiguration file, and should use the key FACEBOOK_CLIENT_ID and FACEBOOK_CLIENT_SECRET. For example:

FACEBOOK_CLIENT_ID=xxxxxx316646661
FACEBOOK_CLIENT_SECRET=xxxxxx889c333b5f9ea5c0a2bf760262

Code overview

Folders

  • app - Contains all the Eloquent models
  • app/Http/Controllers/Api - Contains all the api controllers
  • app/Http/Middleware - Contains the JWT auth middleware
  • app/Http/Requests/Api - Contains all the api form requests
  • app/RealWorld/Favorite - Contains the files implementing the favorite feature
  • app/RealWorld/Filters - Contains the query filters used for filtering api requests
  • app/RealWorld/Follow - Contains the files implementing the follow feature
  • app/RealWorld/Paginate - Contains the pagination class used to paginate the result
  • app/RealWorld/Slug - Contains the files implementing slugs to articles
  • app/RealWorld/Transformers - Contains all the data transformers
  • config - Contains all the application configuration files
  • database/factories - Contains the model factory for all the models
  • database/migrations - Contains all the database migrations
  • database/seeds - Contains the database seeder
  • routes - Contains all the api routes defined in api.php file
  • tests - Contains all the application tests
  • tests/Feature/Api - Contains all the api tests

Environment variables

  • .env - Environment variables can be set in this file

Note : You can quickly set the database information and other variables in this file and have the application fully working.

About

Laravel App to create facebook quizzes on Facebook and go viral

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published