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\Http\Controllers\Admin; | |
| use App\User; | |
| use Illuminate\Http\Request; | |
| use App\Http\Controllers\Controller; | |
| use Illuminate\Support\Facades\Auth; | |
| use Illuminate\Support\Facades\Validator; |
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\Http\Middleware; | |
| use App\User; | |
| use Closure; | |
| use Illuminate\Support\Facades\Auth; | |
| class CheckAdmin | |
| { |
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; | |
| use Illuminate\Notifications\Notifiable; | |
| use Illuminate\Foundation\Auth\User as Authenticatable; | |
| class User extends Authenticatable | |
| { | |
| use Notifiable; |
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
| cd /opt/letsencrypt | |
| # command uitvoeren | |
| sudo -H ./letsencrypt-auto certonly --standalone --renew-by-default -d example.com -d www.example.com | |
| # voorbeeld nginx conf | |
| # jouw config is: /etc/nginx/sites-available/maartenpeels.com | |
| # voeg onderstaande toe aan je server { ... } block | |
| listen 443 ssl; | |
| listen [::]:443 ssl; |
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
| sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt | |
| cd /opt/letsencrypt | |
| sudo -H ./letsencrypt-auto certonly --standalone --renew-by-default -d example.com -d www.example.com | |
| # cronjob, maandelijks | |
| echo '@monthly root /opt/letsencrypt/letsencrypt-auto certonly --quiet --standalone --renew-by-default -d example.com -d www.example.com >> /var/log/letsencrypt/letsencrypt-auto-update.log' | sudo tee --append /etc/crontab | |
| # /etc/nginx/sites-enabled/yourivanmill.nl |
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 | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Web Routes | |
| |-------------------------------------------------------------------------- | |
| | | |
| | Here is where you can register web routes for your application. These | |
| | routes are loaded by the RouteServiceProvider within a group which | |
| | contains the "web" middleware group. Now create something great! |
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\Providers; | |
| use Faker\Factory; | |
| use Faker\Generator; | |
| use Illuminate\Support\ServiceProvider; | |
| class AppServiceProvider extends ServiceProvider | |
| { |
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
| // task model | |
| 'use strict'; | |
| module.exports = (sequelize, DataTypes) => { | |
| const Task = sequelize.define('Task', { | |
| name: DataTypes.STRING | |
| }); | |
| Task.associations = function (models) { | |
| Task.belongsTo(models.User, { |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Facebook Login JavaScript Example</title> | |
| <meta charset="UTF-8"> | |
| </head> | |
| <body> | |
| <script> | |
| // This is called with the results from from FB.getLoginStatus(). | |
| function statusChangeCallback(response) { |
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
| String url = "http://feetback-api.yourivanmill.nl/api/videos"; | |
| Request request = new Request.Builder() | |
| .url(url) | |
| .header("Authorization", String.format("Bearer %s", token)) | |
| .build(); | |
| OkHttpClient client = new OkHttpClient(); | |
| client.newCall(request).enqueue(new Callback() { | |
| @Override | |
| public void onFailure(Call call, IOException e) { |