This file contains 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
public function create(Request $request) | |
{ | |
$validator = Validator::make($request->all(), [ | |
'username' => 'required|unique:users|max:255', | |
'email' => 'required|unique:users|max:255', | |
'amount' => 'required', | |
]); | |
if ($validator->fails()) { | |
return redirect()->route('user.index') |
This file contains 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\Auth; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Foundation\Auth\AuthenticatesUsers; | |
use Illuminate\Http\Request; | |
class LoginController extends Controller | |
{ |
This file contains 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\Auth; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Foundation\Auth\AuthenticatesUsers; | |
use Illuminate\Http\Request; | |
class LoginController extends Controller | |
{ |
This file contains 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
import React, {useEffect} from 'react'; | |
import { | |
SafeAreaView, | |
StyleSheet, | |
ScrollView, | |
View, | |
Text, | |
Platform, | |
StatusBar | |
} from 'react-native'; |
This file contains 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
import React, { PureComponent } from 'react'; | |
import { View, Text, Dimensions, StyleSheet } from 'react-native'; | |
import NetInfo from "@react-native-community/netinfo"; | |
const { width } = Dimensions.get('window'); | |
function MiniOfflineSign() { | |
return ( | |
<View style={{flex:0.05}}> | |
<View style={styles.offlineContainer}> |
This file contains 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
import React, { PureComponent } from 'react'; | |
import { View, Text, Dimensions, StyleSheet } from 'react-native'; | |
import NetInfo from "@react-native-community/netinfo"; | |
const { width } = Dimensions.get('window'); | |
class OfflineMessage extends PureComponent { | |
state = { | |
isConnected: true, | |
unsubscribe: '' |
This file contains 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
import React, {Fragment,Component} from 'react'; | |
import { | |
SafeAreaView, | |
StyleSheet, | |
ScrollView, | |
View, | |
Text, | |
SectionList, | |
FlatList, | |
ActivityIndicator, |
This file contains 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
var timeout; | |
function warning() { | |
timeout = setTimeout(function () { | |
//saveProjectPreview(); | |
}, 1000); | |
//saveProjectPreview (); | |
return "You are leaving the page"; | |
} |
This file contains 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
//put this code in jquery | |
var elem = angular.element(document.querySelector('[ng-controller]')); | |
var injector = elem.injector(); | |
//get the service. | |
var contentService = injector.get('Your-Service'); | |
//now use contentService to access service |
This file contains 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
import sys | |
def find_between( s, first, last ): | |
start = int(first)-1; | |
end = int(last) | |
num = s[start:end] | |
return int(''.join(map(str,num))) | |
def divisible(num): | |
if(num%7==0): |
NewerOlder