Browse AI Field GuideForum Podcast
All ThreadsLeaderboard
  1. Discussions

    1. Popular This Week
    2. Popular All Time
    3. Solved
    4. Unsolved
    5. No Replies Yet

untymage's avatar

Received Mockery Illuminate Encryption Encrypter::getKey(), but no expectations were specified

I want to test a redirect: $this->disableCookieEncryption() ->withoutExceptionHandling() ->get(route('test', ['hash' => 123])) ->assertRedirect($redirect); but i got : Mockery\Exception\BadMethodCallException : Received Mockery_2_Illuminate_Encryption_Encrypter::getKey(), but no expectations were specified /var/www/html/vendor/laravel/framework/src/Illuminate/C

untymage's avatar
untymage's avatar untymage2yrs agoTesting
2
1
Last reply by untymage 2yrs ago
debjit's avatar

Livewire(Filament) CORS error with blackblaze.

Github Repo(dev branch): https://github.com/debjit/hackathon-bdd I am using s3 compatiable api to upload using filament, but I found when uploading livewire is getting CORS policy error. I do not have any CORS policy enabled. options "hare everything in this bucket with all HTTPS origins" is checked and here is my cors policy, 'paths' => ['api/*', 'sanctum/csr

debjit's avatar
debjit's avatar debjit2yrs agoFilament
2
1
Last reply by debjit 2yrs ago
peffraimidis's avatar

Laravel factory persists in the wrong database

Hello everyone, I am using a model Employee and we are using multiple databases setup so we also have $connection and $table paremeter set on the model. We are trying to write tests using factory and we use a .env.testing file to define our connections to our test databases. The problem is that when we persist a model with factory()->create() the model is persisted is the da

peffraimidis's avatar
peffraimidis's avatar Tray22yrs agoLaravel
7
1
Last reply by Tray2 2yrs ago
SilvaDreamdeal's avatar

Laravel Modules

I have a project that is being very big I started to look around for better ways to work, because we will divide the project in modules. I found nwidart.com Dividing the project into multiple modules is exactly what we want But, if my application has 2 modules (A and B) and for one element of the team I just want to give access to the B module. Its the only one that he can see,

SilvaDreamdeal's avatar
SilvaDreamdeal's avatar anddre2yrs agoLaravel
8
1
Last reply by anddre 2yrs ago
scottycam's avatar

Livewire Dynamic Component

Hi, I am trying to get Livewire v3 Dynamic children components to work but I am encountering an error. Docs for Livewire Dynamic Component: https://livewire.laravel.com/docs/nesting#dynamic-child-components If I use this in my blade view, it renders as expected <livewire:test /> If I use either of these i get an error ($test = 'test';) <livewire:dynamic-component :is=

scottycam's avatar
scottycam's avatar scottycam2yrs agoLivewire
1
1
Last reply by scottycam 2yrs ago
eggplantSword's avatar

Invalid key supplied only in certains routes

I'm trying to test out some api routes and I keep getting this error but it's strange because if I copy the route and move it, it works. This is the first part of the error, it's over 300 lines total I'll add the rest if it's important "message": "Invalid key supplied", "exception": "LogicException", "file": "/var/www/bt

eggplantSword's avatar
eggplantSword's avatar dasunthara...1yr agoGeneral
16
26
Last reply by dasuntharanga 1yr ago
sanne_v_leeuwen's avatar

Undefined array key "argv"

Hi i try to make a command to test my site and display this in a blade: my Livewire/Test.php <?php namespace Leeuwenkasteel\Install\Http\Livewire; use Livewire\Component; use Artisan; class Test extends Component{ public $output = ''; public function runUnitTest(){ $result = Artisan::call('test'); $this->output = Artisan::output(); } pub

sanne_v_leeuwen's avatar
sanne_v_leeuwen's avatar josecamese...2yrs agoTesting
1
1
Last reply by josecameselle 2yrs ago
Magalliu's avatar

Using Macroable or allowing somehow to add custom attributes to RouteRegistrar

I'm doing this: \Illuminate\Routing\Route::macro('description', function (string $description) { $this->action['description'] = isset($this->action['description']) ? $this->action['description'].$description : $description; return $this; }); So I can do this: Route::post('/test', [TestController::class, 'test'])->description('this

Magalliu's avatar
Magalliu's avatar Magalliu2yrs agoLaravel
0
1
phyuphyuthaw's avatar

Expected response code 220 but got an empty response

I am trying to send email from Laravel. My settings of .env file is as below. MAIL_DRIVER=sendmail MAIL_HOST=localhost MAIL_PORT=465 MAIL_USERNAME=/cpanel webmail created/ MAIL_PASSWORD=password MAIL_ENCRYPTION=null [email protected] MAIL_FROM_NAME="[email protected]" MAIL_TIMEOUT=600 MAIL_DEBUG=true My current function I am going call the route

phyuphyuthaw's avatar
phyuphyuthaw's avatar Snapey2yrs agoLaravel
4
1
Last reply by Snapey 2yrs ago
garrettmassey's avatar

Extending "BelongsToMany" with custom default columns

I have a model that has many different "BelongsToMany" relationships, and each separate BelongsToMany relationship also contains the following: notes - string column for additional notes created_by - foreign key relating to users.id timestamps - default Laravel model timestamps I know that the belongsToMany relationship can have the withPivot and withTimestamps m

garrettmassey's avatar
garrettmassey's avatar vincent150...2yrs agoEloquent
4
11
Last reply by vincent15000 2yrs ago
garrettmassey's avatar

artisan tests pass when using in-mem DB, fail when using MySQL

I haven't figured out why this is happening, but I need to set up my tests and phpunit such that it uses a mysql database to seed and run database tests, instead of in memory / sqlite. Originally, the tests worked perfectly with sqlite and everything passed, but I recently added a migration that uses some storedAs functions that sqlite can't handle (like DATEDIFF). So I need to

garrettmassey's avatar
garrettmassey's avatar garrettmas...2yrs agoTesting
3
1
Last reply by garrettmassey 2yrs ago
vincent15000's avatar

assertSet seems to not refresh the view

Hello, I have a Livewire component to display a list of recipes. In this component I have a checkbox to choose to display or not the shared recipes. public $withSharedRecipes; public function render() { $searches = explode(' ', $this->search); $searches = array_diff($searches, ['']); $recipes = Recipe:: with('user:id,name') ->when($this->c

vincent15000's avatar
vincent15000's avatar tisuchi2yrs agoLivewire
4
1
Last reply by tisuchi 2yrs ago
Andi1982's avatar

fixed file to database: extend laravel model vs. using a trait

I get from a mainframe system a fixed file and have to store its data into the mysql database. The problem is that there are different kind of record types. So not each record looks same. Here is some example data: 0001:081212345:K01: :CUSTOMER_FIRSTNAME :CUSTOMER_LASTNAME :278:0000:ANYSTRING 0002:081212345:K04: :OTHER_DATA :00012983,93:00073823,72: :EUR 00

Andi1982's avatar
Andi1982's avatar vincent150...2yrs agoLaravel
3
1
Last reply by vincent15000 2yrs ago
vincent15000's avatar

Livewire 3 - assetUnauthorized() doesn't work

Hello, I have written a test to check that a user cannot create a category. /** @test */ public function user_cannot_create_a_category(): void { $user = User::factory()->create(); $this->assertEquals(0, Category::count()); Livewire:: actingAs($user) ->test(Categories::class) ->set('form.name', 'Une catégorie') ->call(

vincent15000's avatar
vincent15000's avatar vincent150...2yrs agoLivewire
8
1
Last reply by vincent15000 2yrs ago
Brainmaniac's avatar

Sail and Dusk

Hi, I have been following this info https://laravel.com/docs/10.x/sail#laravel-dusk to get dusk to work with sail. When I try to run a dusk test with: sail dusk ... I get: Failed to connect to localhost port 9515 after 0 ms: Connection refused Facebook\WebDriver\Exception\Internal\WebDriverCurlException: Curl error thrown for http POST to /session with params: {"capabiliti

Brainmaniac's avatar
Brainmaniac's avatar Brainmania...2yrs agoGeneral
0
1
stevemoretz's avatar

spy on user method in query result

Here's a simplified version of what I'm trying to do. class Something{ function something(){ foreach(User::all() as $user){ $user->method(); } } } And I want to spy if that method was called when something method on this class was called, but I can't mock User class as eloquent doesn't seem to be using it at all! method itself is te

stevemoretz's avatar
stevemoretz's avatar vincent150...2yrs agoLaravel
9
1
Last reply by vincent15000 2yrs ago
morox's avatar

unnecessary import of js/css files that does not exist causes the site not to be displayed

Hey everyone, I have a laravel/vuejs/inertiajs project that runs completly correct on my website example.site (public_html directory) without any problem, but I want to have that project on another direcotry like example.site/test too to run some tests. So I made a direcotry called test on home directory of my server and clone the project there and called the required commands

morox's avatar
morox's avatar morox2yrs agoInertia
0
1
Bowiemtl's avatar

Laragon mail sender not supported anymore

Hey everyone, I want to test out email verification through Laragon's mail sender which is done using a Gmail account. The problem here is that Google has deprecated email and password authorization and going to https://myaccount.google.com/lesssecureapps just shows the functionality is unavailable. I'm unsure what alternatives I have to test out email verification locally and

Bowiemtl's avatar
Bowiemtl's avatar abhirupnan...2yrs agoTesting
4
1
Last reply by abhirupnandy 2yrs ago
Smiffy's avatar

Prevent Mockery running method if failure

Really unsure if this is possible but better to ask. I am wanting to test that a file is wrtten to the filesystem and using mockery to determine whether this the case. if the test fails, the file is physically written to the disk but if it passes, it isn't. I understand why this is but wondered if there was a way to tell Mockery "If this fails, don't perform the action&quo

Smiffy's avatar
Smiffy's avatar Smiffy2yrs agoTesting
1
1
Last reply by Smiffy 2yrs ago
SteveRaines's avatar

502 error after switching from wifi to ethernet and back to wifi

Like the title says, I was on wifi, then switched to ethernet for a zoom call, then switched back to wifi. This is something I usually do lately when I have a zoom call because my laptop (a mac) has been having wifi issues (but only when I'm on zoom). But basically every time I do this, it messes with my dev environment. When I try to pull up one of our test sites I get a 502 e

SteveRaines's avatar
SteveRaines's avatar SteveRaine...2yrs agoGeneral
1
1
Last reply by SteveRaines 2yrs ago
Miral's avatar

Array store in array with duplicate form

i am making a duplicate of form using close in that form i have checkbox , for a single form i am passing an array and i can easily store that like this implode(',', $checkedValuesArray); but when i make duplicate of form how can i store that 2 forms data in array? Here is my controller code $customInputName = $request->input('customInputName'); $inputType =

Miral's avatar
Miral's avatar Miral2yrs agoLaravel
0
1
sanjeevkamat's avatar

Image file upload testing not working on update action.

I'm trying to test my update action method in a controller where a fake image needs to be created and uploaded to test if the update action method is working. So, I create fake image using UploadedFile::make()->image('imageName.jpeg') and it is validated before being saved as usual. But my test is failing throwing the validation errors for the image saying the "imageNam

sanjeevkamat's avatar
sanjeevkamat's avatar sanjeevkam...2yrs agoLaravel
1
1
Last reply by sanjeevkamat 2yrs ago
MaxSpl's avatar

PHPUnit tests: request sent on the same url responds with method not allowed

Hello, I've run across a problem that I haven't been able to solve for quite some time. I've got two tests that create a page with two different flags, which define the position that will be assigned to the newly created page. Having a couple of those flags I naturally want to test each of them so the test is making a request to the same url with the same data but different fla

MaxSpl's avatar
MaxSpl's avatar MaxSpl2yrs agoTesting
7
1
Last reply by MaxSpl 2yrs ago
NotSteve's avatar

Receiving Empty JSON in Testing

I have this code: <?php namespace Tests\Feature; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Http\Response; use Tests\TestCase; class JSONResponseStockPredictionsTest extends TestCase { use RefreshDatabase; /** * A basic feature test example. * * @return void */ public function test_example() { $response =

NotSteve's avatar
NotSteve's avatar NotSteve2yrs agoTesting
3
1
Last reply by NotSteve 2yrs ago
matirdamb's avatar

Laravel nova trying out before buying?

i tried to install nova locally and test it out before purchasing but apparently you already need to fill in a license when installing locally. Is it true that I cant try it out first before buying? If so, I dont feel like paying 100$ to try something out I may not want to use after all. Also, any alternatives to Laravel Nova if this is the case?

matirdamb's avatar
matirdamb's avatar tisuchi2yrs agoNova
1
1
Last reply by tisuchi 2yrs ago
Yonibrese's avatar

Help with mobile screen orientation actions

Hello, I have made a mobile view for a simple webpage, I have one issue though I have an image where what I want to happen is when a user touches the image it goes full screen and the orientation of the screen changes from "portrait" to "landscape" and only while on a mobile device. I have added the following code . HTML/Blade: <div class="Image_bloc

Yonibrese's avatar
Yonibrese's avatar Yonibrese2yrs agoJavaScript
1
1
Last reply by Yonibrese 2yrs ago
PeterN123's avatar

Issue running php artisan migrate - Chirper App

Hello everyone, I am building my first Laravel app Chirper with Docker. I manage to set up the basic, but I however have issue with "PHP Artisan Migrate" This is the error: Illuminate\Database\QueryException SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: nodename nor servname provided, or not known (Connection: mysql, SQL: select *

PeterN123's avatar
PeterN123's avatar Snapey2yrs agoLaravel
7
1
Last reply by Snapey 2yrs ago
HT-ftw's avatar

Livewire 3, data not binding problem

Hi Everyone, for quite a while I'm struggling with the issue below. I have this simple component: namespace App\Livewire\Livewiretest; use Livewire\Component; class Livewiretest extends Component { public $test='hello'; public function render() { return view('livewire.livewiretest.livewiretest'); } } and the following template: <div> &

HT-ftw's avatar
HT-ftw's avatar ibrahimshi...2yrs agoLivewire
9
1
Last reply by ibrahimshiyam 2yrs ago
bwrigley's avatar

Vue3 and Laravel testing

Hi Everyone, I'm looking at how to best test my Vue components in my Laravel project. Still very new to Vue here so please forgive the vague questions! I've seen that Jeffrey has done a series on this, but I'm not sure how up-to-date it is and whether Vue test utils and Mocha are still the best combination to use? I appreciate that Dusk will only offer end-to-end testing rathe

bwrigley's avatar
bwrigley's avatar bwrigley2yrs agoTesting
2
1
Last reply by bwrigley 2yrs ago
theall-knowing's avatar

Deploy Laravel on 000webhost- upload image file error

I have just deployed my laravel project to 000webhost, everything works fine, but when I upload image file to change user's avatar it returns empty string, only input file type, the others input works normally. This only cause on 000webhost, my local works normally, so I don't think my code have wrong. This error cause when I upload image file. (You can test it in my website &q

theall-knowing's avatar
theall-knowing's avatar theall-kno...2yrs agoGeneral
0
1
obada123's avatar

Extending Laravel Illuminate\Http\Request

Hello everyone, I'm trying to extend Laravel's Illuminate\Http\Request class to create a custom request class and use it in a middleware, but I'm having some trouble getting it to work. Here's what I've done so far: Created a new class called CustomRequest that extends Illuminate\Http\Request. In this class, I've added a new method called apiKey that retrieves the value of the

obada123's avatar
obada123's avatar Niush2yrs agoLaravel
5
39
Last reply by Niush 2yrs ago
mstdmstd's avatar

Why Element 'iframe' is not supported for youtube links with mews/purifier?

In laravel 8 app with mews/purifier: 3.4, I need to show youtube video(defined using <iframe ...) As youtube iframe block is cleared by \Purifier::clean( method I found branch https://stackoverflow.com/questions/25649525/laravel-package-purifer-not-work-with-iframe and tried to modify my config/purifier.php file like: 'settings' => [ 'default' => [ 'HTML.Do

mstdmstd's avatar
mstdmstd's avatar mstdmstd2yrs agoLaravel
2
1
Last reply by mstdmstd 2yrs ago
phayes0289's avatar

API Routes Are Not Working

I am having a problem with my API routes that I cannot figure out what is wrong. The following is my very brief route file for my API: <?php use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; use App\Http\Controllers\Api\CadIncidentController; use App\Models\CadIncident; /* |-------------------------------------------------------------------------- | API Ro

phayes0289's avatar
phayes0289's avatar dja19781yr agoLaravel
8
5
Last reply by dja1978 1yr ago
mhalahmdi's avatar

Soketi stop working after testing

Hey I successfully set up the Soketi server on AWS Elastic Beanstalk it was working fine but suddenly after making a test with Artillery it stop working I was thinking maybe it is about the logs file of the Soketi being full, but I don't know where the directory of the logs file is, to clear all the logs. does anyone faced this issue dose and knows to fix it

mhalahmdi's avatar
mhalahmdi's avatar mhalahmdi2yrs agoLaravel
1
1
Last reply by mhalahmdi 2yrs ago
Ninj4df's avatar

Laravel mock service that has a constructor

Hello guys. Let's say that you have a UserService class with a constructor, something like public function __construct(private User $user){} And you want to mock that service object on a controller test for example. Is it doable? The user is a very specific object that can change dynamically, so I can't see any way to inject that on the controller's constructor or method or get

Ninj4df's avatar
Ninj4df's avatar martinbean2yrs agoLaravel
7
3
Last reply by martinbean 2yrs ago
Tiskiel's avatar

Is it possible to render just data without view ?

Hello, In my case, I need to be able to send an Inertia or JSON response via a controller which will be fetched by the component. I have a sheet without a url which opens on top of a page and I want to be able to do a Get on my web route to retrieve the data. I tried this: <?php namespace App\Http\Controllers; use App\Data\OperatorMarkerData; use App\Models\Marker; use Ine

Tiskiel's avatar
Tiskiel's avatar Tiskiel2yrs agoCode Review
4
1
Last reply by Tiskiel 2yrs ago
AtomCoder's avatar

HTTP Client - Incorrect Status Code Response

Hi Guys, I'm having a niggly issue with the Laravel HTTP Client. Im making simple GET requests to test but it seem to be returning incorrect status codes. For example if I send a request to : Http::get('https://www.google.com') I get a response of 200 However, if I make a request to : Http::get('https://www.google.com/jibberish') I also get a response of 200. This is not the ex

AtomCoder's avatar
AtomCoder's avatar AtomCoder2yrs agoLaravel
7
1
Last reply by AtomCoder 2yrs ago
Ninj4df's avatar

PHPUnit - Recommendation when we have logic seperated from Controller

Hope you do fine guys. I would like to mostly have an open conversation with you . A thought that has been on my mind again and again the last weeks. Suppose that you have 1 controller that is calling a service's function which contains business logic and returns a response. Which of the following you consider as a best practice while testing this, and why? Write a Feature t

Ninj4df's avatar
Ninj4df's avatar PovilasKor...2yrs agoTesting
11
1
Last reply by PovilasKorop 2yrs ago
orphikkkk's avatar

419 Page Expired error on every network request.

My Laravel project was running completely fine and then I had to re setup the project in my laptop so I deleted the project directory and cloned the project in a new directory. After that I get 419 page expired error on every network request. It is showing that error in the network tab when any Livewire network request is triggered and also on any form submission eg. login form

orphikkkk's avatar
orphikkkk's avatar vidalramir...4mos agoLaravel
15
6,237
Last reply by vidalramirezjesus63-ops 4mos ago
krobus's avatar

SSR server not rendering HTML (Inertia JS)

Hello. I got the SSR process to run, but it doesn't seem to work when I test it locally (doesn't generate any HTML when Javascript is disabled). It's showing some warnings whenever the site is loaded that I don't think are normal: [Vue warn]: Invalid prop: type check failed for prop "initialComponent". Expected Object, got Function [Vue warn]: [@vue/server-renderer] I

krobus's avatar
krobus's avatar krobus2yrs agoInertia
0
1
hayleybech's avatar

Updating to Inertia 1.0 throws "Cannot use import statement outside a module"

When updating Inertia to 1.0, I get the following error when running my test suite: Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will

hayleybech's avatar
hayleybech's avatar gych2yrs agoInertia
2
1
Last reply by gych 2yrs ago
Deadly_Smile's avatar

File object becomes en empty object when passing by Redux Toolkit

Hi, I am trying to pass a file to my back-end server from react front-end but whenever I pass the file by "reduxjs/toolkit/query/react", in the json payload that object becomes an empty object. This is my code: editUser: builder.mutation({ invalidatesTags: (result, error, arg) => { return [{ type: "user" }]; }, query: ({

Deadly_Smile's avatar
Deadly_Smile's avatar MaxineAlba...2yrs agoReact
1
1
Last reply by MaxineAlban34 2yrs ago
el-skunk's avatar

Dynamic eloquent relation

I have a scenario where a DB table stores sport results and there is a home_team_id and an away_team_id What I want to do in an eloquent relation is determine which of these team IDs is the opponent based on an ID held in a config file. The code below is what I've tried as a function in a model. But I can't access any $this attributes at this level in the model. I've proved thi

el-skunk's avatar
el-skunk's avatar krisi_gjik...2yrs agoEloquent
3
1
Last reply by krisi_gjika 2yrs ago
Alexzz's avatar

Atomic Locks Not working

Hello, i am having race conditions issues and atomic locks have not been working it's really been a problem additionally I can't test it locally as it works as expected no matter how fast I try to click the endpoints, but on build, if click fast the receiver will get funded even if the sender has no cash $lock = Cache::lock('transferCash_'. $sender->id . '_lock', 10)

Alexzz's avatar
Alexzz's avatar Adamzz2yrs agoLaravel
8
1
Last reply by Adamzz 2yrs ago
PetroGromovo's avatar

Why phpPgAdmin on ubuntu server shows message No objects found ?

I try to run phpPgAdmin 5.1 under my remove ubuntu 18, but I see message No objects found. I uploaded phppgadmin from github and downloaded it under /var/www/html File /var/www/html/phppgadmin/conf/config.inc.php have : root@hoster-server:~# cat /var/www/html/phppgadmin/conf/config.inc.php <?php /** * Central phpPgAdmin configuration. As a user you

PetroGromovo's avatar
PetroGromovo's avatar PetroGromo...2yrs agoGeneral
0
1
banditoluigui's avatar

login con google

Estoy usando Laragon para ejecutar mis aplicaciones de desarrollo de laravel. La url de Laragon termina con .test pero en los URI de redirección autorizados de Google solo acepta uri que termina con .com o .org. Mi problema ahora es cómo pruebo mi aplicación en desarrollo, qué uri proporciono a google para redirigir después de usar correctamente iniciar sesión con la cuenta de

banditoluigui's avatar
banditoluigui's avatar banditolui...2yrs agoLaravel
0
1
francuel's avatar

Use more than one JS file in Vite

Hello, I'm trying to insert a custom JS file that contains some helpers in my views with Blade. I noticed that even apparently configuring everything correctly, I can't access constant variables or functions in that file. Always give the error "Uncaught ReferenceError". Follows the settings of my files. vite.config.js import { defineConfig } from 'vite'; import larave

francuel's avatar
francuel's avatar martinbean2yrs agoVite
6
2
Last reply by martinbean 2yrs ago
aosdev's avatar

Laravel job processing one by one without chains

Hey, I have a job and putting to queue like 6000 records, the job is requesting to a service, it only works one time at month. Service required 1 second between requests. When i don't use chains, it keeps requesting like 3 times or 4 times at second. So i tried job chains and sleep(1) at my job class. This time when 1 job is failed, stops the entire queue. Also i have two colum

aosdev's avatar
aosdev's avatar Snapey2yrs agoLaravel
4
1
Last reply by Snapey 2yrs ago
amshehzad's avatar

See full error stack in tests

Hi, I'm running tests with Pest but in case of error, I do not see full error stack but just a single frame which does not allow me to understand what exactly is wrong e.g I run a test and get this: FAILED Tests\Unit\Models\AttendanceTest > it has relevant scope TypeError Illegal offset type in isset or empty at vendor\la

amshehzad's avatar
amshehzad's avatar amshehzad2yrs agoLaravel
5
1
Last reply by amshehzad 2yrs ago
Meenaachy's avatar

Post text and image to twitter using laravel and twitter api version 2

$tweetText = $request->input('tweet_text'); // $image = []; $media = $connection->upload('media/upload', ['media' => 'images/botton-image.jpg'], true); // array_push($image, $media->media_id_string); // check result (returns media object) // var_dump($media); //Create a Tweet $tweetParams = [ 'text' => $tweetText, 'media'=> ['media_ids' => [$media->

Meenaachy's avatar
Meenaachy's avatar hupp2yrs agoLaravel
1
1
Last reply by hupp 2yrs ago

Want us to email you occasionally with Laracasts news?

Nine out of ten doctors recommend Laracasts over competing brands. Come inside, see for yourself, and massively level up your development skills in the process.

Learn
BrowseSeriesCreatorSeriesLaravel PathLarabitsPlayground
Discuss
ForumPodcastSupport
Extras
Gift CertificatesApparelFAQiOS AppTerms
Social
X(Twitter)TikTokYoutube

© Laracasts 2026. All rights reserved. Yes, all of them. That means you, Todd.

Proudly hosted with Laravel Forge and DigitalOcean.

Want us to email you occasionally with Laracasts news?

Nine out of ten doctors recommend Laracasts over competing brands. Come inside, see for yourself, and massively level up your development skills in the process.

Learn
BrowseSeriesCreatorSeriesLaravel PathLarabitsPlayground
Discuss
ForumPodcastSupport
Extras
Gift CertificatesApparelFAQiOS AppTerms
Social
X(Twitter)TikTokYoutube

© Laracasts 2026. All rights reserved. Yes, all of them. That means you, Todd.

Proudly hosted with Laravel Forge and DigitalOcean.