This is a simple movie application built with Laravel 5.8 that integrates with the OMDb API to display movie data. The application features user authentication, movie listing with infinite scrolling, and the ability to manage favorite movies.
- Framework: Laravel 5.8
- Frontend: Blade
- Backend: PHP 7.4
- Database: MySQL
- Build Tool: Laravel Mix (Webpack)
- API: OMDb API for fetching movie data
laravel/framework
: 5.8laravel/ui
: For authentication
laravel-mix
: For compiling assets (CSS and JS)sass
: CSS preprocessor
cross-env
: For setting environment variableswebpack
: Module bundler
- Login: Use the provided credentials to log in.
- Movie List: Browse movies with infinite scrolling.
- Favorite Movies: Add or remove movies from your favorites list.
- Clone the repository
Clone the repository from GitHub:
git clone https://github.com/yustikodm/movie.git movie-app cd movie-app
- Install dependencies
Install PHP dependencies using Composer:
composer install
- Set up environment variables
Copy the .env.example file to create a new .env file:
cp .env.example .env
Open the .env file and configure the following variables based on your environment:
APP_NAME: Name of your application APP_URL: The URL your application will run on DB_CONNECTION: Database connection type (usually mysql) DB_HOST: Database host (usually 127.0.0.1) DB_PORT: Database port (usually 3306) DB_DATABASE: The name of your database DB_USERNAME: Your database username DB_PASSWORD: Your database password
- Generate application key
Run the following command to generate an application key:
php artisan key:generate
- Run database migrations
To create the necessary database tables, run the migrations and db:seed (but dont forget change the credentials in app seeder):
php artisan migrate php artisan db:seed
- Set file permissions
Ensure the storage and bootstrap/cache directories have the correct permissions:
chmod -R 775 storage chmod -R 775 bootstrap/cache
- Start the development server
Run the following command to start the Laravel development server:
By default, the application will be available at http://localhost:8000.
php artisan serve