Untuk menentukan role dari user, misalnya apakah di administrator, staff, member, dll
class Rbac {| name: Back up database | |
| run-name: Task | |
| on: | |
| schedule: | |
| - cron: '0 4 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| backup: | |
| runs-on: ubuntu-latest | |
| env: |
| // try here http://pdfmake.org/playground.html | |
| var dd = { | |
| content: [ | |
| { | |
| columns: [ | |
| { | |
| image: | |
| 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABjCAYAAADeg0+zAAAACXBIWXMAABYlAAAWJQFJUiTwAAAQbUlEQVR42u1dh3tUVRbnf9hvv5WuJBAkhZKEJEAoZkICBKWpVAUERClSFQgl9CZIjYAiuAvLoq4FdEURRQQVFUGa9A5SpUsJ4ez9nXn35c3kvZk3aQQ49/t+32TevHLL+d1T7rkvZWrEPkECgcAeZaQTBAIhiEAgBBEIhCACgRBEIBCCCARCEIFACCIQCEEEAiGIQCAQgggEQhCBQAgiEAhBBAIhiEAgBBEIhCACgRBEIBCCCARCEOkIgUAIIhAIQQQCIYhAIAQRCIQgAoEQRCAQgggEQhCBQAgiEAiEIAKBEEQgEIIIBEIQgUAIIhAIQQQPOh6v08TVMSFIATuzuO7t9Cy35xXmOQVtZyjXBTq3IL/heEGeHxmXQlHxHh/g2P1IlDL3khi6s6rXbkzVajaiiFqNqJofIiyfOF93Pj7dDnoEX9/YdtDz6tCE6xCqYOrz8Il6oi3+z7F+Rvi1y7+t+notWG7r4v8M/34LRlzb61z2hXVc8D0sqgFVikigitXqMvA3jul2RcbdP0QpFRqkTr1mlNj4SYpLbmGLeAWcg/MfrZFEFVSnV41pyJ0daJbTv9Vt1JJiGzQPeF7NhKZch2ACFUhAcH2tpDRTyO0EEe1JUPWxayfqGF03lcKiG1DFCK9wgdhuiaJ/r9swgxJUXYD45AzXGqRuw5aW61pQjTrurkP9MB4YFxxLb9WFuvceQv0Gj2J06z2Y0p7qzP2Cc6rVbBgS+R9agkTFp1Dlx5NowdvL6Pr1v+jSpct09dp1W1y5cpX+vHiJtmzbQVN |
| <?php | |
| namespace App\Http\Middleware; | |
| use Closure; | |
| use Symfony\Component\HttpFoundation\Cookie; | |
| use Illuminate\Contracts\Encryption\Encrypter; | |
| use Illuminate\Session\TokenMismatchException; | |
| class VerifyCsrfToken { |
| import mongoose, { Schema } from 'mongoose'; | |
| const peopleSchema = new Schema( | |
| { | |
| firstName: { | |
| type: String, | |
| required: true, | |
| trim: true | |
| }, | |
| lastName: { |
| const polka = require('polka') | |
| module.exports = polka() | |
| .get('/', (req, res) => { | |
| res.end('this is the api') | |
| }) |
To enable the Storage facade in Lumen 5.2 you need to modify a few things.
First of all you need to create a filesystems.php in a config folder.
The config folder needs to be at the same level as your app and bootstrap folder. If it's not there yet just create it.