This project is a Laravel application that utilizes the TMDB (The Movie Database) API to fetch movie data.
To get started with this project, follow these steps:
-
Clone the repository
git clone https://github.com/Teon54/moives_api_laravel.git
-
Install dependencies
Navigate into your project directory and run:
composer install npm install && npm run dev
-
Set up environment variables
Copy the
.env.example
file to.env
:cp .env.example .env
Update the
.env
file with your database and TMDB API credentials:APP_NAME=Laravel APP_ENV=local APP_KEY=your-app-key APP_DEBUG=true APP_URL=http://localhost ... DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=movie_example DB_USERNAME=root DB_PASSWORD=your-db-password ... TMDB_TOKEN=your-tmdb-api-token
-
Generate application key
Run the following command to generate a new application key:
php artisan key:generate
-
Run migrations
Run the database migrations to set up the database schema:
php artisan migrate
-
Start the development server
Finally, start the Laravel development server:
php artisan serve
Your Laravel application should now be running locally. Access it at http://localhost:8000.
You can now use this application to fetch movie data from the TMDB API. Make sure to explore the available routes and functionalities provided by the application.