This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace app\controllers; | |
| use app\models\Provinsi; | |
| class LokasiController extends Controller | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace app\controllers; | |
| use Yii; | |
| use yii\filters\Cors; | |
| class Controller extends \yii\rest\Controller{ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Kita akan menggunakan port 8080 pada localhost untuk server dari aplikasi BarBek | |
| php yii serve -p=8080 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| * Override method fields untuk menghilangkan password dari response data | |
| * | |
| */ | |
| public function fields() | |
| { | |
| $fields = parent::fields(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Override method fields untuk menghilangkan password dari response data | |
| * | |
| */ | |
| public function fields() | |
| { | |
| $fields = parent::fields(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace app\controllers; | |
| use Yii; | |
| use yii\rest\Controller; | |
| use yii\filters\Cors; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $params = require(__DIR__ . '/params.php'); | |
| $config = [ | |
| 'id' => 'basic', | |
| 'basePath' => dirname(__DIR__), | |
| 'bootstrap' => ['log'], | |
| 'components' => [ | |
| 'request' => [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace app\controllers; | |
| use Yii; | |
| use yii\rest\Controller; | |
| use yii\filters\Cors; | |
| use app\models\SignupForm; | |
| use app\models\LoginForm; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace app\models; | |
| use Yii; | |
| use yii\base\Model; | |
| /** | |
| * LoginForm is the model behind the login form. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace app\models; | |
| use yii\base\Model; | |
| use app\models\User; | |
| /** | |
| * Signup form | |
| */ | |
| class SignupForm extends Model | |
| { |