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\Database\Eloquent\Model; | |
class Users extends Model | |
{ | |
protected $fillable = [ | |
'id', | |
'name', | |
'lastname', | |
'email', |
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
import React, { Fragment } from 'react'; | |
import { SafeAreaView, Text, StatusBar, Button } from 'react-native'; | |
const App = ({ navigation }) => { | |
return ( | |
<Fragment> | |
<StatusBar barStyle="dark-content" /> | |
<SafeAreaView> | |
<Text>App</Text> |
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
import React, { Fragment } from "react"; | |
import { SafeAreaView, Text, StatusBar } from "react-native"; | |
const Sobre = () => { | |
return ( | |
<Fragment> | |
<StatusBar barStyle="dark-content" /> | |
<SafeAreaView> | |
<Text>Sobre</Text> | |
</SafeAreaView> |
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
import { AppRegistry } from "react-native"; | |
import Routes from "./Routes"; | |
import { name as appName } from "./app.json"; | |
AppRegistry.registerComponent(appName, () => Routes); |
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
import { createStackNavigator, createAppContainer } from "react-navigation"; | |
import App from './App'; | |
import Sobre from "./Sobre"; | |
const Routes = createStackNavigator({ | |
Home: { | |
screen: App, | |
}, | |
Sobre: { | |
screen: Sobre, |
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
import React, { Fragment } from "react"; | |
import { SafeAreaView, Text, StatusBar } from "react-native"; | |
const App = () => { | |
return ( | |
<Fragment> | |
<StatusBar barStyle="dark-content" /> | |
<SafeAreaView> | |
<Text>Teste</Text> | |
</SafeAreaView> |
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; | |
use Illuminate\Http\Response; | |
class MessagesController extends Controller { | |
private $_model = "App\Messages"; | |
use RESTActions; | |
public function index() { | |
$m = $this -> _model; | |
return $this->respond(Response::HTTP_OK, $m::with('user')->get()); | |
} | |
public function show_user_messages($id) { |
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; | |
class UsersController extends Controller { | |
private $_model = "App\Users"; | |
use RESTActions; | |
} |
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; | |
use Illuminate\Http\Request; | |
use Illuminate\Http\Response; | |
trait RESTActions { | |
public function all() | |
{ |
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 Illuminate\Support\ServiceProvider; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Register any application services. |