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\Support\Facades\Http; | |
| use Illuminate\Support\Facades\Storage; | |
| use Intervention\Image\Facades\Image; | |
| class PlateController extends Controller |
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
| #include "esp_camera.h" | |
| #include <WiFi.h> | |
| #include <HTTPClient.h> | |
| #include <WebServer.h> | |
| #define CAMERA_MODEL_AI_THINKER // Has PSRAM | |
| #include "camera_pins.h" | |
| // =========================== | |
| // Enter your WiFi credentials |
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 { useEffect, useState } from 'react'; | |
| import axios from "axios"; | |
| function App() { | |
| // Llista editorials | |
| const [llista,setLlista] = useState([]); | |
| // Error que s'ha produït | |
| const [error, setError] = useState(null); | |
| // Element nou o que s'actualitza |
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 { useState } from 'react'; | |
| import './App.css'; | |
| const PRODUCTS = [ | |
| {category: "Fruits", price: "$1", stocked: true, name: "Apple"}, | |
| {category: "Fruits", price: "$1", stocked: true, name: "Dragonfruit"}, | |
| {category: "Fruits", price: "$2", stocked: false, name: "Passionfruit"}, | |
| {category: "Vegetables", price: "$2", stocked: true, name: "Spinach"}, |
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
| // Canvis en el fitxer app.js o server.js o index.js | |
| // Instal·lar mòdul CORS : npm install cors | |
| // Habilita crides CORS: Crides des de diferents origens permeses | |
| app.use(cors()) | |
| //app.use(express.urlencoded({ extended: true })); | |
| // Comentar línia anterior: enviament dades per formulari |
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\api; | |
| use App\Http\Controllers\Controller; | |
| use Illuminate\Http\Request; | |
| use App\Models\Planet; | |
| use 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
| // resources/views/planets/api/index.blade.php | |
| @extends('plantilla') | |
| @section('content') | |
| CRUD PLANETES | |
| <div> | |
| <input type="text" id="planetNameInput"> | |
| <button id="saveButton" >Save</button> | |
| </div> | |
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 | |
| error_reporting(E_ALL); | |
| ini_set('display_errors', '1'); | |
| session_start(); | |
| // url de la forma: index.php?control=nomControlador | |
| if (isset($_GET['control'])) { | |
| $control = $_GET['control']; |
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 | |
| include_once 'Model.php'; | |
| class Usuaris extends Model{ | |
| protected $taula ="usuaris"; | |
| // Afegir mètode per afegir un nou usuari | |
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 | |
| include_once 'Model.php'; | |
| class Superheroes extends Model{ | |
| protected $taula="heroes"; | |
| // Afegir a la BD un nou superheroi | |
| public function add($heroname,$realname,$gender,$race) { |
NewerOlder