The Swift App Sample with Laravel RESTful API
The Swift App Sample with Laravel RESTful API.
Clone the repository in your pc using git.
$ git clone https://github.com/superdev115/Laravel-Swift-Sample.git
$ cd Laravel-Swift-Sample
$ cd ApiServer
$ composer install
or you can use phpMyAdmin.
mysql -u root -p
mysql> CREATE DATABASE <your_database_name>;
You’ll need to set
$ cp .env.example .env
DB_HOST
, DB_DATABASE
, DB_USERNAME
, and DB_PASSWORD
.Run the application by using Artisan commands.
Clear cache
$ php artisan cache:clear
Generate the APP_KEY
$ php artisan key:generate
Run the migrations
$ php artisan migrate
Seed fake data
$ php php artisan db:seed
Run the application using Artisan
$ php artisan serve
Install pods using cocoapods.
$ cd TestApi
$ pod install
Open TestApi.xcworkspace file.
The swift project has some pods.
Pod name | Reference |
---|---|
Alamofire | https://github.com/Alamofire/Alamofire |
SwiftyJSON | https://github.com/SwiftyJSON/SwiftyJSON |
Kingfisher | https://github.com/onevcat/Kingfisher |
SQLite.swift | https://github.com/stephencelis/SQLite.swift |
SwiftEventBus | https://github.com/cesarferreira/SwiftEventBus |
MaterialComponents/Snackbar | https://material.io/develop/ios/components/snackbars |
MIT
Free Source Code, Hell Yeah!