/movies

(Test Driven Development) (Live Link) (31-Jul-2023) With Laravel 10 we query the movies endpoint at www.rapidapi.com/rapidapi/api/movie-database-alternative/ I have been working with Laravel since Laravel 5.4 - www.endoflife.date/laravel

Primary LanguagePHPBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

MainClass.png

movies.png

Movies API

(Test Driven Development) (31-Jul-2023) With Laravel 10 we query the movies endpoint at www.rapidapi.com/rapidapi/api/movie-database-alternative/ I have been working with Laravel since Laravel 5.4 - www.endoflife.date/laravel

Tinker

php artisan tinker
> $m = new \App\Models\Movie;
= App\Models\Movie {#6216}
> $m->searchApi('Avengers')
= {#6230
    +"Search": [
      {#6227
        +"Title": "The Avengers",
        +"Year": "2012",
        +"imdbID": "tt0848228",
        +"Type": "movie",
        +"Poster": "https://m.media-amazon.com/images/M/MV5BNDYxNjQyMjAtNTdiOS00NGYwLWFmNTAtNThmYjU5ZGI2YTI1XkEyXkFqcGdeQXVyMTMxODk2OTU@._V1_SX300.jpg",
      },
      {#6235
        +"Title": "Avengers: Endgame",
        +"Year": "2019",
        +"imdbID": "tt4154796",
        +"Type": "movie",
        +"Poster": "https://m.media-amazon.com/images/M/MV5BMTc5MDE2ODcwNV5BMl5BanBnXkFtZTgwMzI2NzQ2NzM@._V1_SX300.jpg",
      },
      {#6240
        +"Title": "Avengers: Infinity War",
        +"Year": "2018",
        +"imdbID": "tt4154756",
        +"Type": "movie",
    ...

Installation

Create our environment file.

cp .env.example .env

Install our app dependencies.

composer i

Generate app key.

# php artisan key:generate
composer run post-create-project-cmd

Run migrations with seeders.

php artisan migrate --seed

Install javascript required packages.

yarn && yarn build
# Do `yarn dev` during development to see live changes
# of your blade and js and css/scss dependencies with vite.config.js

Usage

# php artisan serve
php artisan serve --port 3000

Api Documentation

php artisan route:list
# example output:
...
POST       api/user ............................ login › Api\UserController@login
GET|HEAD   api/user/authorize .................. Api\UserController@authorizeUser
POST       api/user/register ................... Api\UserController@register
...

Unit Tests

# php artisan test --filter api
php artisan test

Misc

See laravel makefile

See food nutrition facts search web app.

See crm.

See birthday currency.

See php scraper.

See amazon scraper.

See python amazon scraper 2.

See wordpress.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

BSD