Let's say you have 2 models. App/Models/User and App/Models/Admin
Inside your config/auth.js, you can create multiple authenticators for admin and user.
{
user: {
serializer: 'lucid',
model: 'App/Models/User',
scheme: 'session',| doLast { | |
| def moveFunc = { resSuffix -> | |
| File originalDir = file("${resourcesDir}/drawable-${resSuffix}") | |
| if (originalDir.exists()) { | |
| File destDir = file("${resourcesDir}/drawable-${resSuffix}-v4") | |
| ant.move(file: originalDir, tofile: destDir) | |
| } | |
| } | |
| moveFunc.curry("ldpi").call() | |
| moveFunc.curry("mdpi").call() |
| import React from 'react'; | |
| import Routes from '~/routes'; | |
| import {ApolloProvider} from '@apollo/react-hooks'; | |
| import client from '~/services/apollo'; | |
| const App = () => { | |
| return ( | |
| <ApolloProvider client={client}> | |
| <PaperProvider theme={theme}> |
| MYSQL_ROOT_PASSWORD=root | |
| MYSQL_DATABASE=database_name |
| MYSQL_ROOT_PASSWORD=root | |
| MYSQL_DATABASE=database |
| import { ApolloClient } from "apollo-client"; | |
| import { ApolloLink } from "apollo-link"; | |
| import { HttpLink } from "apollo-link-http"; | |
| import { onError } from "apollo-link-error"; | |
| import { InMemoryCache } from "apollo-cache-inmemory"; | |
| import { getToken } from "./token"; | |
| import * as Toast from "./notification"; |
| [alias] | |
| ci = commit | |
| co = checkout | |
| cm = checkout master | |
| cb = checkout -b | |
| st = status -sb | |
| sf = show --name-only | |
| lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30 | |
| incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u}) | |
| outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..) |
| MYSQL_ROOT_PASSWORD=root | |
| MYSQL_DATABASE=dbname |
| import React from 'react'; | |
| import {ScrollView} from 'react-native'; | |
| import { RootContainer, Content, Scroll } from './styles'; | |
| export default function ContentAware({rootStyle, contentStyle, children}) { | |
| return ( | |
| <RootContainer style={rootStyle}> | |
| <Scroll style={contentStyle}> | |
| {children} |
| Create a new file named commitlint.config.js with content: | |
| module.exports = { | |
| extends: ['@commitlint/config-conventional'] | |
| } | |
| Add in package.json: | |
| "husky": { | |
| "hooks": { |